From 376a0b37e3c778d4ac1ace7ca8f92c7625af2c06 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Mon, 9 Jan 2017 10:11:50 +0100 Subject: [PATCH] Fix ServerTestCase.test_unprefixed test The test was always failing, actual reason is the `app.run.configure()` fails to reset the `APPLICATION_ROOT` setting which `ServerTestCase.test_prefixed` overloads (side effect). This patch *do not* fix app.run.configure as it seems uneasy, but takes a different approach which has the advantage of making the test more explicit. Would still be a good thing to investigate more on configure(). Fix #163 --- budget/tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/budget/tests.py b/budget/tests.py index eea7537..8c1f973 100644 --- a/budget/tests.py +++ b/budget/tests.py @@ -934,6 +934,7 @@ class ServerTestCase(APITestCase): super(ServerTestCase, self).setUp() def test_unprefixed(self): + run.app.config['APPLICATION_ROOT'] = '/' req = self.app.get("/foo/") self.assertStatus(303, req)