def test_unlink(self): config_path = osp.join(osp.dirname(__file__), 'test_cli.yaml') q = QuayCon(load_config(config_path)) org = 'cogniteev' (q.org(QUAYIO_REGISTRY, org) or {}).pop('repositories', None) q.unlink('{}/{}'.format(QUAYIO_REGISTRY, org)) self.assertEqual( q.config, { 'organizations': { 'quay.io/cogniteev': { 'token': '0123456789ABCDEF' }, 'https://index.docker.io/v1/_': { 'repositories': { 'python': { } } } } } )