1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

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
This commit is contained in:
Jocelyn Delalande 2017-01-09 10:11:50 +01:00
parent 4d5c8a507b
commit 376a0b37e3

View file

@ -934,6 +934,7 @@ class ServerTestCase(APITestCase):
super(ServerTestCase, self).setUp() super(ServerTestCase, self).setUp()
def test_unprefixed(self): def test_unprefixed(self):
run.app.config['APPLICATION_ROOT'] = '/'
req = self.app.get("/foo/") req = self.app.get("/foo/")
self.assertStatus(303, req) self.assertStatus(303, req)