From 78af70b2c188e6e80e96cc3896eda241264197b7 Mon Sep 17 00:00:00 2001 From: Glandos Date: Fri, 15 Jul 2022 19:54:41 +0200 Subject: [PATCH] Add url from request --- ihatemoney/tests/common/ihatemoney_testcase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ihatemoney/tests/common/ihatemoney_testcase.py b/ihatemoney/tests/common/ihatemoney_testcase.py index eda86ab7..b88831cc 100644 --- a/ihatemoney/tests/common/ihatemoney_testcase.py +++ b/ihatemoney/tests/common/ihatemoney_testcase.py @@ -103,7 +103,9 @@ class IhatemoneyTestCase(BaseTestCase): TESTING = True WTF_CSRF_ENABLED = False # Simplifies the tests. - def assertStatus(self, expected, resp, url=""): + def assertStatus(self, expected, resp, url=None): + if url is None: + url = resp.request.path return self.assertEqual( expected, resp.status_code,