fix tests

This commit is contained in:
wh1te909 2020-11-26 00:02:11 +00:00
parent e39dfbd624
commit 8636758a90
1 changed files with 2 additions and 2 deletions

View File

@ -163,14 +163,14 @@ class TestSoftwareTasks(TacticalTestCase):
nats_cmd.return_value = "timeout" nats_cmd.return_value = "timeout"
ret = get_installed_software(agent.pk) ret = get_installed_software(agent.pk)
self.assertFalse(ret) self.assertFalse(ret)
nats_cmd.assert_called_with({"func": "softwarelist"}, timeout=15) nats_cmd.assert_called_with({"func": "softwarelist"}, timeout=20)
nats_cmd.reset_mock() nats_cmd.reset_mock()
# test successful attempt # test successful attempt
nats_cmd.return_value = nats_return nats_cmd.return_value = nats_return
ret = get_installed_software(agent.pk) ret = get_installed_software(agent.pk)
self.assertTrue(ret) self.assertTrue(ret)
nats_cmd.assert_called_with({"func": "softwarelist"}, timeout=15) nats_cmd.assert_called_with({"func": "softwarelist"}, timeout=20)
@patch("agents.models.Agent.salt_api_cmd") @patch("agents.models.Agent.salt_api_cmd")
@patch("software.tasks.get_installed_software.delay") @patch("software.tasks.get_installed_software.delay")