def test_allocate(self): self.client.call = Mock(return_value=2) assert Image.allocate(self.client, IMAGE_TEMPLATE) == 2