MCPcopy Index your code
hub / github.com/docker/docker-py / test_load_config_unknown_keys

Method test_load_config_unknown_keys

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

Source from the content-addressed store, hash-verified

401 assert cfg.get('auth') is None
402
403 def test_load_config_unknown_keys(self):
404 folder = tempfile.mkdtemp()
405 self.addCleanup(shutil.rmtree, folder)
406 dockercfg_path = os.path.join(folder, 'config.json')
407 config = {
408 'detachKeys': 'ctrl-q, ctrl-u, ctrl-i'
409 }
410 with open(dockercfg_path, 'w') as f:
411 json.dump(config, f)
412
413 cfg = auth.load_config(dockercfg_path)
414 assert dict(cfg) == {'auths': {}}
415
416 def test_load_config_invalid_auth_dict(self):
417 folder = tempfile.mkdtemp()

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
load_configMethod · 0.80

Tested by

no test coverage detected