'Test that when scaling if the API returns an error, that is not of type
APIError, that error is re-raised.'

def test_scale_with_unexpected_exception(self):

    service = self.create_service(u'web')
    next_number = service._next_container_number()
    service.create_container(number=next_number, quiet=True)
    with mock.patch(u'compose.container.Container.create', side_effect=ValueError(u'BOOM')):
        with self.assertRaises(ValueError):
            service.scale(3)
    self.assertEqual(len(service.containers()), 1)
    self.assertTrue(service.containers()[0].is_running)
