mirror of https://github.com/docker/docker-py.git
Fix test_login flakes
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
08803743c5
commit
4c708f568c
|
@ -214,12 +214,13 @@ class DockerApiTest(BaseAPIClientTest):
|
||||||
|
|
||||||
def test_login(self):
|
def test_login(self):
|
||||||
self.client.login('sakuya', 'izayoi')
|
self.client.login('sakuya', 'izayoi')
|
||||||
fake_request.assert_called_with(
|
args = fake_request.call_args
|
||||||
'POST', url_prefix + 'auth',
|
assert args[0][0] == 'POST'
|
||||||
data=json.dumps({'username': 'sakuya', 'password': 'izayoi'}),
|
assert args[0][1] == url_prefix + 'auth'
|
||||||
timeout=DEFAULT_TIMEOUT_SECONDS,
|
assert json.loads(args[1]['data']) == {
|
||||||
headers={'Content-Type': 'application/json'}
|
'username': 'sakuya', 'password': 'izayoi'
|
||||||
)
|
}
|
||||||
|
assert args[1]['headers'] == {'Content-Type': 'application/json'}
|
||||||
|
|
||||||
assert self.client._auth_configs['auths'] == {
|
assert self.client._auth_configs['auths'] == {
|
||||||
'docker.io': {
|
'docker.io': {
|
||||||
|
|
Loading…
Reference in New Issue