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

Method test_get_file_to_dir

tests/integration/modules/test_cp.py:54–63  ·  view source on GitHub ↗

cp.get_file

(self)

Source from the content-addressed store, hash-verified

52
53 @pytest.mark.slow_test
54 def test_get_file_to_dir(self):
55 """
56 cp.get_file
57 """
58 tgt = os.path.join(RUNTIME_VARS.TMP, "")
59 self.run_function("cp.get_file", ["salt://grail/scene33", tgt])
60 with salt.utils.files.fopen(tgt + "scene33", "r") as scene:
61 data = salt.utils.stringutils.to_unicode(scene.read())
62 self.assertIn("KNIGHT: They're nervous, sire.", data)
63 self.assertNotIn("bacon", data)
64
65 @with_tempfile()
66 @pytest.mark.skip_on_windows(reason="This test hangs on Windows on Py3")

Callers

nothing calls this directly

Calls 2

run_functionMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected