Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Jul 25, 2024
1 parent 2966313 commit f6ad65c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions bioblend/_tests/TestGalaxyQuotas.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,26 @@ def test_delete_undelete_quota(self):

@test_util.skip_unless_galaxy("release_19.09") # for user purging
def test_update_non_default_quota(self):
"""
test if a non default quota can be updated (needs to use default=None,
default="no" will fail)
"""
if self.gi.config.get_config()["use_remote_user"]:
self.skipTest("This Galaxy instance is not configured to use local users")
new_username = test_util.random_string()
new_user_email = f"{new_username}@example.org"
password = test_util.random_string(20)
new_user = self.gi.users.create_local_user(new_username, new_user_email, password)
print(new_user)

quota = self.gi.quotas.create_quota(name="non_default_quota", description="testing",
amount="100 GB",
operation="+",
in_users=[new_user['id']],
)
print(quota)
quota = self.gi.quotas.create_quota(
name="non_default_quota",
description="testing",
amount="100 GB",
operation="+",
in_users=[new_user["id"]],
)
self.gi.quotas.update_quota(quota["id"], default=None, amount="200 GB")

if self.gi.config.get_config()["allow_user_deletion"]:
self.gi.users.delete_user(new_user["id"])
self.gi.users.delete_user(new_user["id"], purge=True)
self.gi.users.delete_user(new_user["id"], purge=True)

0 comments on commit f6ad65c

Please sign in to comment.