

def test_build(self, mock_client):
    self.client = DockerClient()
    self.client.build('ozzy/embryo:git-f3a8020', {
        'POWERED_BY': 'Deis',
    }, 'ozzy/embryo', 'v4')
    docker_build = self.client.client.build
    self.assertTrue(docker_build.called)
    args = {
        'rm': True,
        'tag': 'localhost:5000/ozzy/embryo:v4',
        'stream': True,
    }
    kwargs = docker_build.call_args[1]
    self.assertDictContainsSubset(kwargs, kwargs)
    f = kwargs['fileobj']
    self.assertEqual(f.read(), 'FROM ozzy/embryo:git-f3a8020\nENV POWERED_BY="Deis"')
    with self.assertRaises(PermissionDenied):
        self.client.build('deis/controller:v1.11.1', {
            
        }, 'deis/controller', 'v1.11.1')
    with self.assertRaises(PermissionDenied):
        self.client.build('localhost:5000/deis/controller:v1.11.1', {
            
        }, 'deis/controller', 'v1.11.1')

dataset/ETHPy150Open deis/deis/controller/registry/tests.py DockerClientTest.test_build/VarMisuse@95/165 `args`->`kwargs`