diff options
| author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-01-05 10:03:57 +0000 |
|---|---|---|
| committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-01-05 12:32:56 +0000 |
| commit | 2f3b87a4707b16ccfae67b58ce6d590eb5d5e3ce (patch) | |
| tree | cccb6fe8fcce9bfa34ff67d95214c94e935cd54f /docs/api.md | |
| parent | 47af951ac8bcba23c21802764233f1667f517ba1 (diff) | |
| download | docker-py-2f3b87a4707b16ccfae67b58ce6d590eb5d5e3ce.tar.gz | |
Rewrite Client.import_image() and add less-magical versions
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()`.
Diffstat (limited to 'docs/api.md')
0 files changed, 0 insertions, 0 deletions
