mirror of https://github.com/docker/docker-py.git
Rather than have one function that can do 5 things and attempts to guess what the user wanted, it's good to have a function for each possible method of importing an image. Error cases are handled a lot better this way. The unit test test_import_image_from_file() was changed to be test_import_image_from_bytes(), because if we try to import a temporary file in the test, the 'data' parameter of the 'fake_request' object is an instance of a funny internal type like <_io.BufferedReader name='/tmp/tmpc9chux'> and it's very hard to match such a thing with `mock.assert_called_with()`. |
||
|---|---|---|
| .. | ||
| testdata/certs | ||
| __init__.py | ||
| fake_api.py | ||
| integration_test.py | ||
| test.py | ||
| utils_test.py | ||