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

Method test_get_file_makedirs

tests/integration/modules/test_cp.py:103–115  ·  view source on GitHub ↗

cp.get_file

(self)

Source from the content-addressed store, hash-verified

101
102 @pytest.mark.slow_test
103 def test_get_file_makedirs(self):
104 """
105 cp.get_file
106 """
107 tgt = os.path.join(RUNTIME_VARS.TMP, "make", "dirs", "scene33")
108 self.run_function("cp.get_file", ["salt://grail/scene33", tgt], makedirs=True)
109 self.addCleanup(
110 shutil.rmtree, os.path.join(RUNTIME_VARS.TMP, "make"), ignore_errors=True
111 )
112 with salt.utils.files.fopen(tgt, "r") as scene:
113 data = salt.utils.stringutils.to_unicode(scene.read())
114 self.assertIn("KNIGHT: They're nervous, sire.", data)
115 self.assertNotIn("bacon", data)
116
117 @with_tempfile()
118 @pytest.mark.slow_test

Callers

nothing calls this directly

Calls 2

run_functionMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected