test fix
This commit is contained in:
parent
c712137d76
commit
d40ab96cae
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue