This commit is contained in:
sadnub 2020-09-29 08:35:11 -04:00
parent c712137d76
commit d40ab96cae
1 changed files with 6 additions and 6 deletions

View File

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