aboutsummaryrefslogtreecommitdiff
path: root/budget/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'budget/tests.py')
-rw-r--r--budget/tests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/budget/tests.py b/budget/tests.py
index 0f7c2a2..b151e7f 100644
--- a/budget/tests.py
+++ b/budget/tests.py
@@ -821,5 +821,20 @@ class APITestCase(TestCase):
self.assertStatus(404, req)
+class ServerTestCase(APITestCase):
+ def setUp(self):
+ run.configure()
+ super(ServerTestCase, self).setUp()
+
+ def test_unprefixed(self):
+ req = self.app.get("/foo/")
+ self.assertStatus(303, req)
+
+ def test_prefixed(self):
+ run.app.config['APPLICATION_ROOT'] = '/foo'
+ req = self.app.get("/foo/")
+ self.assertStatus(200, req)
+
+
if __name__ == "__main__":
unittest.main()