Skip to content

Commit

Permalink
is_over_quota test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Sep 11, 2020
1 parent 4975bb3 commit 30cbc41
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/unit/data/test_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,15 @@ def _add_user_quota(self, user, quota):

def _assert_user_quota_is(self, user, amount):
assert amount == self.quota_agent.get_quota(user)
if amount is None:
user.total_disk_usage = 1000
job = self.model.Job()
job.user = user
assert not self.quota_agent.is_over_quota(job, None)
else:
job = self.model.Job()
job.user = user
user.total_disk_usage = amount - 1
assert not self.quota_agent.is_over_quota(job, None)
user.total_disk_usage = amount + 1
assert self.quota_agent.is_over_quota(job, None)

0 comments on commit 30cbc41

Please sign in to comment.