Some fixes for code review.
This commit is contained in:
parent
f15b3d5b84
commit
14eb3005b6
4 changed files with 26 additions and 27 deletions
|
@ -66,7 +66,7 @@ from endpoints.api.permission import (RepositoryUserPermission, RepositoryTeamPe
|
|||
from endpoints.api.superuser import (SuperUserLogs, SuperUserList, SuperUserManagement,
|
||||
SuperUserServiceKeyManagement, SuperUserServiceKey,
|
||||
SuperUserServiceKeyApproval, SuperUserTakeOwnership,
|
||||
Messages)
|
||||
SuperUserMessages)
|
||||
from endpoints.api.secscan import RepositoryImageSecurity
|
||||
from endpoints.api.suconfig import (SuperUserRegistryStatus, SuperUserConfig, SuperUserConfigFile,
|
||||
SuperUserCreateInitialSuperUser)
|
||||
|
@ -4283,11 +4283,13 @@ class TestSuperUserManagement(ApiTestCase):
|
|||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
# Create a message
|
||||
self.postJsonResponse(Messages, data=dict(messages=[{"content": "new message"}]))
|
||||
self.postJsonResponse(SuperUserMessages, data=dict(message={"content": "new message"}))
|
||||
|
||||
json = self.getJsonResponse(Messages)
|
||||
json = self.getJsonResponse(SuperUserMessages)
|
||||
|
||||
self.assertEquals(len(json['messages']), 2)
|
||||
self.assertEquals(json['messages'][1]["content"], "new message")
|
||||
self.assertEquals(json['messages'][1]["id"], 2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Reference in a new issue