aboutsummaryrefslogtreecommitdiff
path: root/budget/tests.py
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2015-11-09 09:26:11 +0100
committerAlexis Metaireau <alexis@notmyidea.org>2015-11-09 09:26:11 +0100
commita8841f9d3f90ec4c1915493a1b34fa1798895772 (patch)
tree665a03e1f5e6b186980a9de8c8abf13b76031135 /budget/tests.py
parenteff0f7c2df4cdbde11f91ca7413af89c3a0606c9 (diff)
parent15091e28c070dc0d248b310fe1aa9638de92424a (diff)
downloadihatemoney-mirror-a8841f9d3f90ec4c1915493a1b34fa1798895772.zip
ihatemoney-mirror-a8841f9d3f90ec4c1915493a1b34fa1798895772.tar.gz
ihatemoney-mirror-a8841f9d3f90ec4c1915493a1b34fa1798895772.tar.bz2
Merge pull request #122 from JocelynDelalande/configurable-prefix
Made an URL prefix configurable in settings
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 1fb9fe4..fd30c63 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()