'Test that calling scale with a desired number that is equal to the
number of containers already running results in no change.'

@mock.patch(u'compose.service.log')
def test_scale_with_desired_number_already_achieved(self, mock_log):

    service = self.create_service(u'web')
    next_number = service._next_container_number()
    container = service.create_container(number=next_number, quiet=True)
    container.start()
    container.inspect()
    assert container.is_running
    assert (len(service.containers()) == 1)
    service.scale(1)
    assert (len(service.containers()) == 1)
    container.inspect()
    assert container.is_running
    captured_output = mock_log.info.call_args[0]
    assert (u'Desired    container    number    already    achieved' in captured_output)
