From 8ebcfd33222a500ff930ad66323d16903c73e67b Mon Sep 17 00:00:00 2001 From: Josh Krawczyk Date: Sat, 15 Aug 2020 14:54:34 -0400 Subject: [PATCH] Fix tests --- api/tacticalrmm/automation/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/tacticalrmm/automation/tests.py b/api/tacticalrmm/automation/tests.py index 1d304f1a..5e28666a 100644 --- a/api/tacticalrmm/automation/tests.py +++ b/api/tacticalrmm/automation/tests.py @@ -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()