Fix tests

This commit is contained in:
Josh Krawczyk 2020-08-15 14:54:34 -04:00
parent 78a3992eb1
commit 8ebcfd3322
1 changed files with 4 additions and 4 deletions

View File

@ -190,7 +190,7 @@ class TestPolicyViews(BaseTestCase):
resp = self.client.post(url, client_payload, format="json")
self.assertEqual(resp.status_code, 200)
# called because the relation changed
mock_task.assert_called_with(location={"client": client.pk}, clear=True)
mock_task.assert_called_with(location={"client": client.client}, clear=True)
mock_task.reset_mock()
# test site add
@ -198,7 +198,7 @@ class TestPolicyViews(BaseTestCase):
self.assertEqual(resp.status_code, 200)
# called because the relation changed
mock_task.assert_called_with(
location={"client": site.client.client, "site": site.pk}, clear=True
location={"client": site.client.client, "site": site.site}, clear=True
)
mock_task.reset_mock()
@ -236,7 +236,7 @@ class TestPolicyViews(BaseTestCase):
resp = self.client.post(url, client_payload, format="json")
self.assertEqual(resp.status_code, 200)
# called because the relation changed
mock_task.assert_called_with(location={"client": client.pk}, clear=True)
mock_task.assert_called_with(location={"client": client.client}, clear=True)
mock_task.reset_mock()
# test site remove
@ -244,7 +244,7 @@ class TestPolicyViews(BaseTestCase):
self.assertEqual(resp.status_code, 200)
# called because the relation changed
mock_task.assert_called_with(
location={"client": site.client.client, "site": site.pk}, clear=True
location={"client": site.client.client, "site": site.site}, clear=True
)
mock_task.reset_mock()