Commit 95fddb49 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Fix missing import and broken test

parent 0732679f
......@@ -133,8 +133,8 @@ class FlavorAPITest(BaseAPITest):
def test_wrong_flavor(self):
"""Test 404 result when requesting a flavor that does not exist."""
# XXX: flavors/22 below fails for no apparent reason
response = self.myget('flavors/%d' % 23)
max_flavor_id = max(Flavor.objects.values_list('id', flat=True))
response = self.myget('flavors/%s' % (max_flavor_id + 1))
self.assertItemNotFound(response)
def test_catch_wrong_api_paths(self, *args):
......
......@@ -171,6 +171,9 @@ def astakos_user(user):
yield
serial = 0
@contextmanager
def mocked_quotaholder(success=True):
with patch("synnefo.quotas.Quotaholder.get") as astakos:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment