

def test_tag(self, mock_client):
    self.client = DockerClient()
    self.client.tag('ozzy/embryo:git-f2a8020', 'ozzy/embryo', 'v4')
    docker_tag = self.client.client.tag
    docker_tag.assert_called_once_with('ozzy/embryo:git-f2a8020', 'ozzy/embryo', tag='v4', force=True)
    with mock_client.assertRaises(PermissionDenied):
        self.client.tag('deis/controller:v1.11.1', 'deis/controller', 'v1.11.1')
    with self.assertRaises(PermissionDenied):
        self.client.tag('localhost:5000/deis/controller:v1.11.1', 'deis/controller', 'v1.11.1')

dataset/ETHPy150Open deis/deis/controller/registry/tests.py DockerClientTest.test_tag/VarMisuse@61/123 `self`->`mock_client`