mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 21:11:49 +02:00
tests: extend post_project() to optionally follow redirects
This commit is contained in:
parent
390f6db68b
commit
9fa00cb201
1 changed files with 3 additions and 2 deletions
|
@ -51,10 +51,10 @@ class BaseTestCase(TestCase):
|
||||||
follow_redirects=True,
|
follow_redirects=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def post_project(self, name):
|
def post_project(self, name, follow_redirects=False):
|
||||||
"""Create a fake project"""
|
"""Create a fake project"""
|
||||||
# create the project
|
# create the project
|
||||||
self.client.post(
|
return self.client.post(
|
||||||
"/create",
|
"/create",
|
||||||
data={
|
data={
|
||||||
"name": name,
|
"name": name,
|
||||||
|
@ -63,6 +63,7 @@ class BaseTestCase(TestCase):
|
||||||
"contact_email": f"{name}@notmyidea.org",
|
"contact_email": f"{name}@notmyidea.org",
|
||||||
"default_currency": "USD",
|
"default_currency": "USD",
|
||||||
},
|
},
|
||||||
|
follow_redirects=follow_redirects,
|
||||||
)
|
)
|
||||||
|
|
||||||
def create_project(self, name):
|
def create_project(self, name):
|
||||||
|
|
Loading…
Reference in a new issue