Fix delete team error message for admin teams

This commit is contained in:
Joseph Schorr 2016-07-11 15:47:05 -04:00
parent da0357a460
commit c1e4bf79b7
2 changed files with 10 additions and 7 deletions

View file

@ -1146,8 +1146,13 @@ class TestDeleteOrganizationTeam(ApiTestCase):
def test_attemptdeleteowners(self):
self.login(ADMIN_ACCESS_USER)
self.deleteResponse(OrganizationTeam, params=dict(orgname=ORGANIZATION, teamname='owners'),
expected_code=400)
resp = self.deleteResponse(OrganizationTeam,
params=dict(orgname=ORGANIZATION, teamname='owners'),
expected_code=400)
data = py_json.loads(resp)
msg = ("Deleting team 'owners' would remove admin ability for user " +
"'devtable' in organization 'buynlarge'")
self.assertEquals(msg, data['message'])
class TestGetOrganizationTeamMembers(ApiTestCase):