Updated the mocking of the flavor_name helper function to match the mocking

of it in test_transformers.
This commit is contained in:
adriant 2014-03-21 15:09:14 +13:00
parent 8686f28659
commit 66a5faddab
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class TestApi(test_interface.TestInterface):
# patch to mock out the novaclient call
with mock.patch('artifice.helpers.flavor_name') as flavor_name:
flavor_name.return_value = "someFlavorName"
flavor_name.side_effect = lambda x: x
resp = self.app.post("/collect_usage")
self.assertEquals(resp.status_int, 200)

View File

@ -19,7 +19,7 @@ class TestDatabaseModule(test_interface.TestInterface):
# patch to mock out the novaclient call
with mock.patch('artifice.helpers.flavor_name') as flavor_name:
flavor_name.return_value = "someFlavorName"
flavor_name.side_effect = lambda x: x
db.enter(usage.values(), self.start, self.end)