summaryrefslogtreecommitdiff
path: root/pecan/tests/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/tests/test_base.py')
-rw-r--r--pecan/tests/test_base.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py
index e5ec6af..d9808a0 100644
--- a/pecan/tests/test_base.py
+++ b/pecan/tests/test_base.py
@@ -33,6 +33,23 @@ class TestAppRoot(PecanTestCase):
assert app.root and isinstance(app.root, SampleRootController)
+class TestEmptyContent(PecanTestCase):
+ @property
+ def app_(self):
+ class RootController(object):
+ @expose()
+ def index(self):
+ pass
+
+ return TestApp(Pecan(RootController()))
+
+ def test_empty_index(self):
+ r = self.app_.get('/')
+ self.assertEqual(r.status_int, 200)
+ self.assertEqual(r.headers['Content-Length'], '0')
+ self.assertEqual(len(r.body), 0)
+
+
class TestIndexRouting(PecanTestCase):
@property