From 9fa00cb201549192707461c431ac0fe5ca4b33fb Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Mon, 18 May 2020 13:26:10 +0200 Subject: [PATCH] tests: extend post_project() to optionally follow redirects --- ihatemoney/tests/tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 4cdf3164..ec2f595d 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -51,10 +51,10 @@ class BaseTestCase(TestCase): follow_redirects=True, ) - def post_project(self, name): + def post_project(self, name, follow_redirects=False): """Create a fake project""" # create the project - self.client.post( + return self.client.post( "/create", data={ "name": name, @@ -63,6 +63,7 @@ class BaseTestCase(TestCase): "contact_email": f"{name}@notmyidea.org", "default_currency": "USD", }, + follow_redirects=follow_redirects, ) def create_project(self, name):