tests: Fix bound
Ensure we do not negative values except for -1 (unlimited). Change-Id: I9a0184ed54054c6466833df24dfbe9ca7d1b454b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
@@ -57,7 +57,7 @@ def fake_get_project_quotas(context, project_id, usages=True):
|
||||
}
|
||||
|
||||
return {
|
||||
k: {'limit': v, 'in_use': v // 2}
|
||||
k: {'limit': v, 'in_use': max(-1, v // 2)}
|
||||
for k, v in absolute_limits.items()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user