diff options
author | Joffrey F <joffrey@docker.com> | 2018-06-26 17:40:49 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2018-06-26 17:40:49 -0700 |
commit | 345be2f38a087e3730103c8d313d31311501ed5d (patch) | |
tree | 20f4dda3c24f5bb1b244b796d8b3cefd13e39efe /tests | |
parent | 5a85cad54785bae45787b2584476c286301329e2 (diff) | |
download | docker-py-c6047-legacy-auth.tar.gz |
Fix support for legacy .dockercfg auth config formatc6047-legacy-auth
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/auth_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/auth_test.py b/tests/unit/auth_test.py index ee32ca0..63e6353 100644 --- a/tests/unit/auth_test.py +++ b/tests/unit/auth_test.py @@ -318,7 +318,7 @@ class LoadConfigTest(unittest.TestCase): with open(dockercfg_path, 'w') as f: json.dump(config, f) - cfg = auth.load_config(dockercfg_path) + cfg = auth.load_config(dockercfg_path)['auths'] assert registry in cfg assert cfg[registry] is not None cfg = cfg[registry] @@ -345,7 +345,7 @@ class LoadConfigTest(unittest.TestCase): json.dump(config, f) with mock.patch.dict(os.environ, {'DOCKER_CONFIG': folder}): - cfg = auth.load_config(None) + cfg = auth.load_config(None)['auths'] assert registry in cfg assert cfg[registry] is not None cfg = cfg[registry] @@ -422,7 +422,7 @@ class LoadConfigTest(unittest.TestCase): json.dump(config, f) cfg = auth.load_config(dockercfg_path) - assert cfg == {} + assert cfg == {'auths': {}} def test_load_config_invalid_auth_dict(self): folder = tempfile.mkdtemp() |