test: add publish_data parameter to login method

This commit is contained in:
Ethan Nguyen 2021-04-20 19:32:03 -04:00
parent c8a8aa4510
commit 74b6932c75
No known key found for this signature in database
GPG Key ID: B4CA5339AF911920

View File

@ -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)