Fix appr tests to use the shared test fixtures
This commit is contained in:
parent
cc09e8738e
commit
d895b4d5ff
6 changed files with 20 additions and 86 deletions
|
@ -859,15 +859,17 @@ class TestDeleteNamespace(ApiTestCase):
|
|||
def test_deletenamespaces(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
# Try to first delete the user. Since they are the sole admin of two orgs, it should fail.
|
||||
# Try to first delete the user. Since they are the sole admin of three orgs, it should fail.
|
||||
with check_transitive_modifications():
|
||||
self.deleteResponse(User, expected_code=400)
|
||||
|
||||
# Delete the two orgs, checking in between.
|
||||
# Delete the three orgs, checking in between.
|
||||
with check_transitive_modifications():
|
||||
self.deleteEmptyResponse(Organization, params=dict(orgname=ORGANIZATION), expected_code=204)
|
||||
self.deleteResponse(User, expected_code=400) # Should still fail.
|
||||
self.deleteEmptyResponse(Organization, params=dict(orgname='library'), expected_code=204)
|
||||
self.deleteResponse(User, expected_code=400) # Should still fail.
|
||||
self.deleteEmptyResponse(Organization, params=dict(orgname='titi'), expected_code=204)
|
||||
|
||||
# Add some queue items for the user.
|
||||
notification_queue.put([ADMIN_ACCESS_USER, 'somerepo', 'somename'], '{}')
|
||||
|
@ -1007,7 +1009,7 @@ class TestConductSearch(ApiTestCase):
|
|||
json = self.getJsonResponse(ConductSearch,
|
||||
params=dict(query='owners'))
|
||||
|
||||
self.assertEquals(3, len(json['results']))
|
||||
self.assertEquals(4, len(json['results']))
|
||||
self.assertEquals(json['results'][0]['kind'], 'team')
|
||||
self.assertEquals(json['results'][0]['name'], 'owners')
|
||||
|
||||
|
|
Reference in a new issue