This commit is contained in:
Rachid Mrad 2023-12-13 15:41:18 -05:00
parent 4adeb6722b
commit 9c8ed1682b
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
4 changed files with 10 additions and 10 deletions

View file

@ -406,8 +406,8 @@ def mock_user():
"""A simple user."""
user_kwargs = dict(
id=4,
first_name="Rachid",
last_name="Mrad",
first_name="Jeff",
last_name="Lebowski",
)
mock_user, _ = User.objects.get_or_create(**user_kwargs)
return mock_user

View file

@ -1021,7 +1021,7 @@ class ListHeaderAdminTest(TestCase):
# Set the GET parameters for testing
request.GET = {
"status": "started",
"investigator": "Rachid Mrad",
"investigator": "Jeff Lebowski",
"q": "search_value",
}
# Call the get_filters method
@ -1032,7 +1032,7 @@ class ListHeaderAdminTest(TestCase):
filters,
[
{"parameter_name": "status", "parameter_value": "started"},
{"parameter_name": "investigator", "parameter_value": "Rachid Mrad"},
{"parameter_name": "investigator", "parameter_value": "Jeff Lebowski"},
],
)

View file

@ -659,7 +659,7 @@ class TestUser(TestCase):
class TestContact(TestCase):
def setUp(self):
self.email = "mayor@igorville.gov"
self.user, _ = User.objects.get_or_create(email=self.email, first_name="Rachid", last_name="Mrad")
self.user, _ = User.objects.get_or_create(email=self.email, first_name="Jeff", last_name="Lebowski")
self.contact, _ = Contact.objects.get_or_create(user=self.user)
def tearDown(self):
@ -670,10 +670,10 @@ class TestContact(TestCase):
def test_saving_contact_updates_user_first_last_names(self):
"""When a contact is updated, we propagate the changes to the linked user if it exists."""
# User and Contact are created and linked as expected
self.assertEqual(self.contact.first_name, "Rachid")
self.assertEqual(self.contact.last_name, "Mrad")
self.assertEqual(self.user.first_name, "Rachid")
self.assertEqual(self.user.last_name, "Mrad")
self.assertEqual(self.contact.first_name, "Jeff")
self.assertEqual(self.contact.last_name, "Lebowski")
self.assertEqual(self.user.first_name, "Jeff")
self.assertEqual(self.user.last_name, "Lebowski")
self.contact.first_name = "Joey"
self.contact.last_name = "Baloney"