Add missing security test for delete org
This commit is contained in:
parent
47e4b1b500
commit
5ed13da2e6
2 changed files with 14 additions and 1 deletions
|
@ -212,8 +212,9 @@ class Organization(ApiResource):
|
|||
raise NotFound()
|
||||
|
||||
model.user.delete_user(org, all_queues)
|
||||
return 'Deleted', 204
|
||||
|
||||
return 'Deleted', 204
|
||||
raise Unauthorized()
|
||||
|
||||
|
||||
@resource('/v1/organization/<orgname>/private')
|
||||
|
|
|
@ -3568,6 +3568,18 @@ class TestOrganizationBuynlarge(ApiTestCase):
|
|||
def test_put_devtable(self):
|
||||
self._run_test('PUT', 200, 'devtable', {})
|
||||
|
||||
def test_delete_anonymous(self):
|
||||
self._run_test('DELETE', 401, None, {})
|
||||
|
||||
def test_delete_freshuser(self):
|
||||
self._run_test('DELETE', 403, 'freshuser', {})
|
||||
|
||||
def test_delete_reader(self):
|
||||
self._run_test('DELETE', 403, 'reader', {})
|
||||
|
||||
def test_delete_devtable(self):
|
||||
self._run_test('DELETE', 204, 'devtable', {})
|
||||
|
||||
|
||||
class TestRepositoryPublicPublicrepo(ApiTestCase):
|
||||
def setUp(self):
|
||||
|
|
Reference in a new issue