MCPcopy
hub / github.com/docker/docker-py / test_load_config_invalid_auth_dict

Method test_load_config_invalid_auth_dict

tests/unit/auth_test.py:416–429  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

414 assert dict(cfg) == {'auths': {}}
415
416 def test_load_config_invalid_auth_dict(self):
417 folder = tempfile.mkdtemp()
418 self.addCleanup(shutil.rmtree, folder)
419 dockercfg_path = os.path.join(folder, 'config.json')
420 config = {
421 'auths': {
422 'scarlet.net': {'sakuya': 'izayoi'}
423 }
424 }
425 with open(dockercfg_path, 'w') as f:
426 json.dump(config, f)
427
428 cfg = auth.load_config(dockercfg_path)
429 assert dict(cfg) == {'auths': {'scarlet.net': {}}}
430
431 def test_load_config_identity_token(self):
432 folder = tempfile.mkdtemp()

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
load_configMethod · 0.80

Tested by

no test coverage detected