示例#1
0
 def test_ensure_testing_spec_base_image_build(self):
     mock_docker_client = Mock()
     mock_build = Mock()
     mock_docker_client.build = mock_build
     testing_spec = {"build": "/path/to/docker_file_folder"}
     _ensure_testing_spec_base_image(mock_docker_client, testing_spec)
     mock_build.assert_has_calls([call(path="/path/to/docker_file_folder", tag="dusty_testing_base/image")])
 def test_ensure_testing_spec_base_image_build(self):
     mock_docker_client = Mock()
     mock_build = Mock()
     mock_docker_client.build = mock_build
     testing_spec = {'build': '/path/to/docker_file_folder'}
     _ensure_testing_spec_base_image(mock_docker_client, testing_spec)
     mock_build.assert_has_calls([call(path='/path/to/docker_file_folder', tag='dusty_testing_base/image')])
示例#3
0
 def test_ensure_testing_spec_base_image_image(self):
     mock_docker_client = Mock()
     testing_spec = {"image": "dusty/image"}
     self.assertEquals(_ensure_testing_spec_base_image(mock_docker_client, testing_spec), "dusty/image")
 def test_ensure_testing_spec_base_image_image(self):
     mock_docker_client = Mock()
     testing_spec = {'image': 'dusty/image'}
     self.assertEquals(_ensure_testing_spec_base_image(mock_docker_client, testing_spec), 'dusty/image')