MCPcopy Index your code
hub / github.com/docker/docker-py / test_import_from_url

Method test_import_from_url

tests/integration/api_image_test.py:282–299  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

280
281 @pytest.mark.skipif(True, reason="Doesn't work inside a container - FIXME")
282 def test_import_from_url(self):
283 # The crappy test HTTP server doesn't handle large files well, so use
284 # a small file.
285 tar_size = 10240
286
287 with self.dummy_tar_stream(n_bytes=tar_size) as tar_data:
288 with self.temporary_http_file_server(tar_data) as url:
289 statuses = self.client.import_image(
290 src=url, repository='test/import-from-url')
291
292 result_text = statuses.splitlines()[-1]
293 result = json.loads(result_text)
294
295 assert 'error' not in result
296
297 assert 'status' in result
298 img_id = result['status']
299 self.tmp_imgs.append(img_id)
300
301
302@requires_api_version('1.25')

Callers

nothing calls this directly

Calls 3

dummy_tar_streamMethod · 0.95
import_imageMethod · 0.80

Tested by

no test coverage detected