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

Method test_get_url

tests/integration/modules/test_cp.py:162–170  ·  view source on GitHub ↗

cp.get_url with salt:// source given

(self, tgt)

Source from the content-addressed store, hash-verified

160 @with_tempfile()
161 @pytest.mark.slow_test
162 def test_get_url(self, tgt):
163 """
164 cp.get_url with salt:// source given
165 """
166 self.run_function("cp.get_url", ["salt://grail/scene33", tgt])
167 with salt.utils.files.fopen(tgt, "r") as scene:
168 data = salt.utils.stringutils.to_unicode(scene.read())
169 self.assertIn("KNIGHT: They're nervous, sire.", data)
170 self.assertNotIn("bacon", data)
171
172 @pytest.mark.slow_test
173 def test_get_url_makedirs(self):

Callers

nothing calls this directly

Calls 2

run_functionMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected