Skip to content

Commit

Permalink
try to add test for quota update
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Aug 22, 2023
1 parent fe48906 commit f7fb54e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions bioblend/_tests/TestGalaxyQuotas.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,30 @@ def test_update_quota(self):
assert quota["bytes"] == 10995116277
assert quota["operation"] == "-"
assert quota["description"] == "asdf"

def test_update_quota_nondefault(self):
"""
try to update a non-default quota (and leave it non-default)
"""
# 1st make it non-default
response = self.gi.quotas.update_quota(
self.quota["id"],
name=self.quota_name,
description="testing",
default="no",
operation="=",
amount="100 GB",
)
assert f"""Quota '{self.quota_name}'-new has been renamed to '{self.quota_name}'""" in response

# update it leaving it non-default
response = self.gi.quotas.update_quota(
self.quota["id"],
name=self.quota_name+"-updated",
)
assert f"""Quota '{self.quota_name}' has been renamed to '{self.quota_name}-updated'""" in response



def test_delete_undelete_quota(self):
self.gi.quotas.update_quota(self.quota["id"], default="no")
Expand Down

0 comments on commit f7fb54e

Please sign in to comment.