@mock.patch('compose.service.Container', autospec=True)
def test_recreate_container_with_timeout(self, _):
    mock_container = mock.create_autospec(Container)
    self.mock_client.inspect_image.return_value = {'Id': 'abc123'}
    service = Service('foo', client=self.mock_client, image='someimage')
    service.recreate_container(mock_container, timeout=1)
    mock_container.stop.assert_called_once_with(timeout=1)
@mock.patch('compose.service.Container', autospec=True)
def test_recreate_container_with_timeout(self, _):
    mock_container = mock.create_autospec(Container)
    self.mock_client.inspect_image.return_value = {'Id': 'abc123'}
    service = Service('foo', client=self.mock_client, image='someimage')
    service.recreate_container(mock_container, timeout=1)
    mock_container.stop.assert_called_once_with(timeout=1)