summaryrefslogtreecommitdiff
path: root/tests/unit/api_test.py
Commit message (Collapse)AuthorAgeFilesLines
* set engine version for unit tests to avoid querying the engineaiordache2020-08-201-17/+34
| | | | Signed-off-by: aiordache <anca.iordache@docker.com>
* tests: remove outdated codeCorentin Henry2019-01-091-2/+0
| | | | | | the _cfg attribute does not exist anymore Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
* Merge pull request #2188 from docker/c6374-credhelpersJoffrey F2018-11-301-7/+5
|\ | | | | Modernize auth management
| * Modernize auth managementJoffrey F2018-11-281-7/+5
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Fix test namesJoffrey F2018-11-301-25/+28
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | fix exec api inconsistencyCorentin Henry2018-11-281-1/+1
| | | | | | | | Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
* | add tests for _read_from_socketCorentin Henry2018-11-281-16/+82
| | | | | | | | | | | | | | | | | | | | Check that the return value against the various combination of parameters this function can take (tty, stream, and demux). This commit also fixes a bug that the tests uncovered a bug in consume_socket_output. Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
* | implement stream demultiplexing for exec commandsCorentin Henry2018-11-271-1/+1
|/ | | | | | fixes https://github.com/docker/docker-py/issues/1952 Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
* Allow passing of env overrides to credstore through APIClient ctorJoffrey F2018-06-081-1/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix socket reading function for TCP (non-HTTPS) connections on WindowsJoffrey F2018-06-061-2/+56
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge branch 'release' into 3.1.0-releaseJoffrey F2018-02-221-1/+0
|\ | | | | | | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com> Conflicts: docker/version.py tests/unit/api_test.py tests/unit/utils_test.py
| * Add login data to the right subdict in auth_configsJoffrey F2018-02-051-0/+18
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Fix test_login flakesJoffrey F2018-02-141-6/+7
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add login data to the right subdict in auth_configs1895-login-authsJoffrey F2018-02-011-0/+18
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Refuse API version < 1.21 ; Remove associated code pathscleanup_deprecatedJoffrey F2018-01-311-1/+0
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Use pytest assertspytest-assertsJoffrey F2018-01-301-45/+34
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix handling of non-multiplexed (TTY) streams over upgraded socketsJoffrey F2017-08-171-1/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Set infinite timeout for the `events` methodJoffrey F2017-03-271-3/+3
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fixed events command related unit tests by passing a timeout valueDamien Nadé2017-02-211-3/+6
| | | | Signed-off-by: Damien Nadé <github@livna.org>
* Start to rename docker-py to docker-sdk-pythonBen Firshman2016-11-281-1/+1
| | | | | | | | | | Pretty much everything except renaming the GitHub repo and documentation, which is not actually done yet. Nearer the release we can do a search/replace for all that stuff. Ref #1310 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Add new user-focused APIBen Firshman2016-11-221-27/+0
| | | | | | See #1086 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Move APIClient tests into single fileBen Firshman2016-11-221-0/+71
| | | | | | For some reason this was spread across two files. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Rename DockerClientTest to BaseAPIClientTestBen Firshman2016-11-221-2/+2
| | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Rename Client to APIClientBen Firshman2016-11-221-13/+17
| | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Drop support for Python 2.6Ben Firshman2016-11-221-11/+5
| | | | | | | Because it's ancient. If you're still using it, you can use an old version of docker-py. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Fix linting errorAanand Prasad2016-11-141-0/+1
| | | | | | | This seems to have been ignored by older versions of flake8, and fixed in version 3.1.0 or 3.1.1. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Update tests to avoid failures on Windows platformsJoffrey F2016-10-141-1/+4
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix a few pep8 issuesBen Firshman2016-09-141-1/+1
| | | | | | autopep8 --in-place --recursive --experimental -aaa --ignore E309 . Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Fix licensesBen Firshman2016-09-051-14/+0
| | | | | | | * Complete main LICENSE * Remove unnecessary licenses from individual files Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Merge pull request #1082 from masci/fix_stream_helperJoffrey F2016-08-231-1/+41
|\ | | | | Invoke self._result passing `json=True` when `decode=True`
| * invoke self._result with json=True if decode=TrueMassimiliano Pippi2016-06-071-1/+41
| | | | | | | | Signed-off-by: Massimiliano Pippi <massi@datadoghq.com>
* | docker client consistency: don't quote ':/'Tomas Tomecek2016-08-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. docker client `/v1.21/images/localhost:5000/busybox/push?tag=` docker-py `/v1.21/images/localhost%3A5000%2Fbusybox/push` Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
* | Set custom user agent on clientBen Firshman2016-07-201-0/+30
| | | | | | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* | Mock read_from_socket methodJoffrey F2016-07-131-1/+6
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* incorporate feedbackDustin Falgout2015-12-041-2/+1
| | | | Signed-off-by: Dustin Falgout <dustin@falgout.us>
* Reorganize test directoriesreorganize_testsJoffrey F2015-10-211-0/+418
More clearly separate unit and integration tests Allow splitting into multiple files Cleaner Signed-off-by: Joffrey F <joffrey@docker.com>