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

Method test_get_url_makedirs

tests/integration/modules/test_cp.py:173–185  ·  view source on GitHub ↗

cp.get_url

(self)

Source from the content-addressed store, hash-verified

171
172 @pytest.mark.slow_test
173 def test_get_url_makedirs(self):
174 """
175 cp.get_url
176 """
177 tgt = os.path.join(RUNTIME_VARS.TMP, "make", "dirs", "scene33")
178 self.run_function("cp.get_url", ["salt://grail/scene33", tgt], makedirs=True)
179 self.addCleanup(
180 shutil.rmtree, os.path.join(RUNTIME_VARS.TMP, "make"), ignore_errors=True
181 )
182 with salt.utils.files.fopen(tgt, "r") as scene:
183 data = salt.utils.stringutils.to_unicode(scene.read())
184 self.assertIn("KNIGHT: They're nervous, sire.", data)
185 self.assertNotIn("bacon", data)
186
187 @pytest.mark.slow_test
188 def test_get_url_dest_empty(self):

Callers

nothing calls this directly

Calls 2

run_functionMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected