@patch('socket.inet_aton', side_effect=socket.error)
@patch('subprocess.check_output', return_value='foo')
@patch.object(DockerRunner, '_cleanup_docker_container', side_effect=None)
@patch.object(DockerRunner, '_start_docker_container', side_effect=None)
def test_assign_ip_timeout_period_raises_runtime_exception_decorated(self, s_mock, co_mock, dr1_mock, dr2_mock):
self.dr._docker_start_timeout = 0.01
with self.assertRaises(RuntimeError):
self.dr.start_docker_container(self.dc)