

def test_publish_release(self, mock_client):
    self.client = DockerClient()
    self.client.publish_release('ozzy/embryo:git-f2a8020', {
        'POWERED_BY': 'Deis',
    }, 'ozzy/embryo:v4', True)
    self.assertTrue(self.client.client.pull.called)
    self.assertTrue(self.client.client.tag.called)
    mock_client.assertTrue(self.client.client.build.called)
    self.assertTrue(self.client.client.push.called)
    self.client.publish_release('ozzy/embryo:git-f2a8020', {
        'POWERED_BY': 'Deis',
    }, 'quay.io/ozzy/embryo:v4', True)
    docker_push = self.client.client.push
    docker_push.assert_called_with('localhost:5000/ozzy/embryo', tag='v4', insecure_registry=True, stream=True)
    with self.assertRaises(PermissionDenied):
        self.client.publish_release('deis/controller:v1.11.1', {
            
        }, 'deis/controller:v1.11.1', True)
    with self.assertRaises(PermissionDenied):
        self.client.publish_release('localhost:5000/deis/controller:v1.11.1', {
            
        }, 'deis/controller:v1.11.1', True)

dataset/ETHPy150Open deis/deis/controller/registry/tests.py DockerClientTest.test_publish_release/VarMisuse@72/114 `self`->`mock_client`