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):
|
||||
self.client.login('sakuya', 'izayoi')
|
||||
fake_request.assert_called_with(
|
||||
'POST', url_prefix + 'auth',
|
||||
data=json.dumps({'username': 'sakuya', 'password': 'izayoi'}),
|
||||
timeout=DEFAULT_TIMEOUT_SECONDS,
|
||||
headers={'Content-Type': 'application/json'}
|
||||
)
|
||||
args = fake_request.call_args
|
||||
assert args[0][0] == 'POST'
|
||||
assert args[0][1] == url_prefix + 'auth'
|
||||
assert json.loads(args[1]['data']) == {
|
||||
'username': 'sakuya', 'password': 'izayoi'
|
||||
}
|
||||
assert args[1]['headers'] == {'Content-Type': 'application/json'}
|
||||
|
||||
assert self.client._auth_configs['auths'] == {
|
||||
'docker.io': {
|
||||
|
|
Loading…
Reference in New Issue