mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 09:40:16 -04:00
test: add publish_data parameter to login method
This commit is contained in:
parent
c8a8aa4510
commit
74b6932c75
|
@ -11,6 +11,7 @@ class TJDestsTestCase(TestCase):
|
||||||
make_student: bool = False,
|
make_student: bool = False,
|
||||||
make_senior: bool = False,
|
make_senior: bool = False,
|
||||||
make_superuser: bool = False,
|
make_superuser: bool = False,
|
||||||
|
publish_data: bool = False,
|
||||||
) -> User:
|
) -> User:
|
||||||
"""
|
"""
|
||||||
Log in as the specified user.
|
Log in as the specified user.
|
||||||
|
@ -21,6 +22,7 @@ class TJDestsTestCase(TestCase):
|
||||||
make_student: Whether to make this user a student.
|
make_student: Whether to make this user a student.
|
||||||
make_senior: Whether to make this user a senior.
|
make_senior: Whether to make this user a senior.
|
||||||
make_superuser: Whether to make this user a superuser.
|
make_superuser: Whether to make this user a superuser.
|
||||||
|
publish_data: Whether to publish this user's data.
|
||||||
Return:
|
Return:
|
||||||
The user.
|
The user.
|
||||||
"""
|
"""
|
||||||
|
@ -32,6 +34,7 @@ class TJDestsTestCase(TestCase):
|
||||||
"is_superuser": make_superuser,
|
"is_superuser": make_superuser,
|
||||||
"is_senior": make_senior,
|
"is_senior": make_senior,
|
||||||
"accepted_terms": accept_tos,
|
"accepted_terms": accept_tos,
|
||||||
|
"publish_data": publish_data,
|
||||||
},
|
},
|
||||||
)[0]
|
)[0]
|
||||||
self.client.force_login(user)
|
self.client.force_login(user)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user