MCPcopy
hub / github.com/saltstack/salt / test_get_file

Method test_get_file

tests/integration/modules/test_cp.py:43–51  ·  view source on GitHub ↗

cp.get_file

(self, tgt)

Source from the content-addressed store, hash-verified

41 @with_tempfile()
42 @pytest.mark.slow_test
43 def test_get_file(self, tgt):
44 """
45 cp.get_file
46 """
47 self.run_function("cp.get_file", ["salt://grail/scene33", tgt])
48 with salt.utils.files.fopen(tgt, "r") as scene:
49 data = salt.utils.stringutils.to_unicode(scene.read())
50 self.assertIn("KNIGHT: They're nervous, sire.", data)
51 self.assertNotIn("bacon", data)
52
53 @pytest.mark.slow_test
54 def test_get_file_to_dir(self):

Callers

nothing calls this directly

Calls 2

run_functionMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected