-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89e3caf
commit bd5e3d9
Showing
1 changed file
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import uuid | ||
|
||
from . import GalaxyTestBase | ||
from . import ( | ||
GalaxyTestBase, | ||
test_util, | ||
) | ||
|
||
|
||
class TestGalaxyQuotas(GalaxyTestBase.GalaxyTestBase): | ||
|
@@ -53,13 +56,21 @@ def test_delete_undelete_quota(self): | |
response = self.gi.quotas.undelete_quota(self.quota["id"]) | ||
assert response == "Undeleted 1 quotas: " + self.quota_name | ||
|
||
|
||
@test_util.skip_unless_galaxy("release_19.09") # for user purging | ||
def test_update_non_default_quote(self): | ||
user = self.gi.users.create_remote_user("[email protected]") | ||
print(user) | ||
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=[user['username']], | ||
in_users=[new_user['username']], | ||
) | ||
self.gi.quotas.update_quota(quota["id"], default="no", amount="200 GB") | ||
self.gi.quotas.update_quota(quota["id"], default="no", amount="200 GB") | ||
|
||
if self.gi.config.get_config()["allow_user_deletion"]: | ||
deleted_user = self.gi.users.delete_user(new_user["id"]) | ||
purged_user = self.gi.users.delete_user(new_user["id"], purge=True) |