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

Method test_path_missing

tests/unit/states/test_disk.py:270–286  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

268 )
269
270 def test_path_missing(self):
271 mock_fs = "/bar"
272 mock_ret = {
273 "name": mock_fs,
274 "result": False,
275 "comment": (
276 "Disk mount {0} not present. Directory {0} does not exist or is not a"
277 " directory".format(mock_fs)
278 ),
279 "changes": {},
280 "data": {},
281 }
282 mock = MagicMock(return_value=False)
283 with patch.object(path, "isdir", mock):
284 self.assertDictEqual(
285 disk.status(mock_fs, "58", "55", absolute=True, free=False), mock_ret
286 )
287
288 # acceptable range
289 def test_path_used_absolute_acceptable(self):

Callers

nothing calls this directly

Calls 2

formatMethod · 0.80
statusMethod · 0.45

Tested by

no test coverage detected