From d40ab96cae9c9b7d931c96ecf3455d3c47eb08b1 Mon Sep 17 00:00:00 2001 From: sadnub Date: Tue, 29 Sep 2020 08:35:11 -0400 Subject: [PATCH] test fix --- api/tacticalrmm/logs/tests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/tacticalrmm/logs/tests.py b/api/tacticalrmm/logs/tests.py index 3b1003b0..b03aea62 100644 --- a/api/tacticalrmm/logs/tests.py +++ b/api/tacticalrmm/logs/tests.py @@ -152,15 +152,16 @@ class TestAuditViews(TacticalTestCase): self.check_not_authenticated("post", url) def test_agent_pending_actions(self): + agent = baker.make("agents.Agent") pending_actions = baker.make( "logs.PendingAction", - agent__pk=self.agent.pk, - agent__hostname=self.agent.hostname, - agent__client=self.agent.client, - agent__site=self.agent.site, + agent__pk=agent.pk, + agent__hostname=agent.hostname, + agent__client=agent.client, + agent__site=agent.site, _quantity=6, ) - url = f"/logs/{self.agent.pk}/pendingactions/" + url = f"/logs/{agent.pk}/pendingactions/" resp = self.client.get(url, format="json") serializer = PendingActionSerializer(pending_actions, many=True) @@ -205,7 +206,6 @@ class TestAuditViews(TacticalTestCase): class TestLogsTasks(TacticalTestCase): def setUp(self): self.authenticate() - self.setup_coresettings() @patch("agents.models.Agent.salt_api_cmd") def test_cancel_pending_action_task(self, mock_salt_cmd):