MCPcopy Index your code
hub / github.com/saltstack/salt / test_status

Method test_status

tests/unit/modules/test_snapper.py:395–410  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

393 self.assertRaises(CommandExecutionError, snapper.run, "unknown.func")
394
395 def test_status(self):
396 with patch(
397 "salt.modules.snapper._get_num_interval", MagicMock(return_value=(42, 43))
398 ), patch("salt.modules.snapper.snapper.GetComparison", MagicMock()), patch(
399 "salt.modules.snapper.snapper.GetFiles",
400 MagicMock(return_value=DBUS_RET["GetFiles"]),
401 ), patch(
402 "salt.modules.snapper.snapper.ListConfigs",
403 MagicMock(return_value=DBUS_RET["ListConfigs"]),
404 ):
405 self.assertCountEqual(snapper.status(), MODULE_RET["GETFILES"])
406 self.assertCountEqual(
407 snapper.status(num_pre="42", num_post=43), MODULE_RET["GETFILES"]
408 )
409 self.assertCountEqual(snapper.status(num_pre=42), MODULE_RET["GETFILES"])
410 self.assertCountEqual(snapper.status(num_post=43), MODULE_RET["GETFILES"])
411
412 def test_changed_files(self):
413 with patch(

Callers

nothing calls this directly

Calls 2

patchFunction · 0.50
statusMethod · 0.45

Tested by

no test coverage detected