Add support for deleting namespaces (users, organizations)
Fixes #102 Fixes #105
This commit is contained in:
parent
a74e94fb67
commit
73eb66eac5
23 changed files with 407 additions and 33 deletions
|
@ -1,8 +1,9 @@
|
|||
from test.test_api_usage import ApiTestCase, READ_ACCESS_USER, ADMIN_ACCESS_USER
|
||||
from endpoints.api.suconfig import (SuperUserRegistryStatus, SuperUserConfig, SuperUserConfigFile,
|
||||
SuperUserCreateInitialSuperUser, SuperUserConfigValidate)
|
||||
from app import config_provider
|
||||
from app import config_provider, all_queues
|
||||
from data.database import User
|
||||
from data import model
|
||||
|
||||
import unittest
|
||||
|
||||
|
@ -95,7 +96,7 @@ class TestSuperUserCreateInitialSuperUser(ApiTestCase):
|
|||
|
||||
# Delete all the users in the DB.
|
||||
for user in list(User.select()):
|
||||
user.delete_instance(recursive=True)
|
||||
model.user.delete_user(user, all_queues, force=True)
|
||||
|
||||
# This method should now succeed.
|
||||
data = dict(username='cooluser', password='password', email='fake@example.com')
|
||||
|
|
Reference in a new issue