Revision 2c6ac437
b/snf-cyclades-app/synnefo/api/test/flavors.py | ||
---|---|---|
133 | 133 |
def test_wrong_flavor(self): |
134 | 134 |
"""Test 404 result when requesting a flavor that does not exist.""" |
135 | 135 |
|
136 |
# XXX: flavors/22 below fails for no apparent reason
|
|
137 |
response = self.myget('flavors/%d' % 23)
|
|
136 |
max_flavor_id = max(Flavor.objects.values_list('id', flat=True))
|
|
137 |
response = self.myget('flavors/%s' % (max_flavor_id + 1))
|
|
138 | 138 |
self.assertItemNotFound(response) |
139 | 139 |
|
140 | 140 |
def test_catch_wrong_api_paths(self, *args): |
b/snf-django-lib/snf_django/utils/testing.py | ||
---|---|---|
171 | 171 |
yield |
172 | 172 |
|
173 | 173 |
|
174 |
serial = 0 |
|
175 |
|
|
176 |
|
|
174 | 177 |
@contextmanager |
175 | 178 |
def mocked_quotaholder(success=True): |
176 | 179 |
with patch("synnefo.quotas.Quotaholder.get") as astakos: |
Also available in: Unified diff