Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
fix tests since zope.publisher changed the output order of the respon…
Browse files Browse the repository at this point in the history
…se headers. Have a minimal version requirement because of that.
  • Loading branch information
janwijbrand committed Sep 28, 2016
1 parent eec2bef commit fed421f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def read(*rnames):
'martian',
'zope.component',
'zope.interface',
'zope.publisher',
'zope.publisher >= 4.2.2',
],
tests_require=tests_require,
extras_require={'test': tests_require},
Expand Down
13 changes: 6 additions & 7 deletions src/grokcore/rest/ftests/rest/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,33 +131,33 @@
>>> print http('POST /++rest++b/app HTTP/1.1')
HTTP/1.0 405 Method Not Allowed
Allow: GET, PUT
Content-Length: 18
Content-Type: text/plain
Allow: GET, PUT
<BLANKLINE>
Method Not Allowed
>>> print http('DELETE /++rest++b/app HTTP/1.1')
HTTP/1.0 405 Method Not Allowed
Content-Length: 18
Allow: GET, PUT
Content-Length: 18
<BLANKLINE>
Method Not Allowed
>>> print http('POST /++rest++c/app HTTP/1.1')
HTTP/1.0 405 Method Not Allowed
Allow:
Content-Length: 18
Content-Type: text/plain
Allow:
<BLANKLINE>
Method Not Allowed
We can also try this with a completely made-up request method, like FROG::
>>> print http('FROG /++rest++b/app HTTP/1.1')
HTTP/1.0 405 Method Not Allowed
Content-Length: 18
Allow: GET, PUT
Content-Length: 18
<BLANKLINE>
Method Not Allowed
Expand Down Expand Up @@ -222,14 +222,14 @@
>>> print http('DELETE /app HTTP/1.1')
HTTP/1.0 405 Method Not Allowed
Content-Length: 18
Allow:
Content-Length: 18
Method Not Allowed
>>> print http('DELETE /app/alpha HTTP/1.1')
HTTP/1.0 405 Method Not Allowed
Content-Length: 18
Allow:
Content-Length: 18
Method Not Allowed
We shouldn't be allowed to PUT either::
Expand Down Expand Up @@ -424,4 +424,3 @@ def GET(self):

def PUT(self):
return "PUT directly registered"

0 comments on commit fed421f

Please sign in to comment.