Skip to content

Commit

Permalink
Test documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroel committed May 18, 2017
1 parent 15f0345 commit 205cb41
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/source/_json/users_created.req
Expand Up @@ -10,8 +10,8 @@ Content-Type: application/json
"home_page": "web.mit.edu/chomsky",
"location": "Cambridge, MA",
"password": "colorlessgreenideas",
"username": "noamchomsky",
"roles": [
"Member"
]
"Contributor"
],
"username": "noamchomsky"
}
2 changes: 1 addition & 1 deletion docs/source/_json/users_created.resp
Expand Up @@ -11,7 +11,7 @@ Location: http://localhost:55001/plone/@users/noamchomsky
"id": "noamchomsky",
"location": "Cambridge, MA",
"roles": [
"Member"
"Contributor"
],
"username": "noamchomsky"
}
2 changes: 1 addition & 1 deletion docs/source/_json/users_update.req
Expand Up @@ -6,6 +6,6 @@ Content-Type: application/json
{
"email": "avram.chomsky@example.com",
"roles": {
"Member": false
"Contributor": false
}
}
4 changes: 3 additions & 1 deletion src/plone/restapi/tests/test_documentation.py
Expand Up @@ -527,7 +527,8 @@ def test_documentation_users_created(self):
'fullname': 'Noam Avram Chomsky',
'home_page': 'web.mit.edu/chomsky',
'description': 'Professor of Linguistics',
'location': 'Cambridge, MA'
'location': 'Cambridge, MA',
'roles': ['Contributor', ],
},
)
save_request_and_response_for_docs('users_created', response)
Expand All @@ -552,6 +553,7 @@ def test_documentation_users_update(self):
'/@users/noam',
json={
'email': 'avram.chomsky@example.com',
'roles': {'Contributor': False, },
},
)
save_request_and_response_for_docs('users_update', response)
Expand Down

0 comments on commit 205cb41

Please sign in to comment.