[Checkins] SVN: grokcore.rest/trunk/src/grokcore/rest/ftests/rest/ Change the tests for new test behaviour. This needs some further investigation

Christian Klinger cklinger at novareto.de
Mon Dec 20 08:52:58 EST 2010


Log message for revision 119015:
  Change the tests for new test behaviour. This needs some further investigation

Changed:
  U   grokcore.rest/trunk/src/grokcore/rest/ftests/rest/localgrants.py
  U   grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py

-=-
Modified: grokcore.rest/trunk/src/grokcore/rest/ftests/rest/localgrants.py
===================================================================
--- grokcore.rest/trunk/src/grokcore/rest/ftests/rest/localgrants.py	2010-12-20 10:27:13 UTC (rev 119014)
+++ grokcore.rest/trunk/src/grokcore/rest/ftests/rest/localgrants.py	2010-12-20 13:52:57 UTC (rev 119015)
@@ -10,10 +10,9 @@
 with a permission.  Therefore we can't access it as anonymous:
 
   >>> print http_call('GET', '/++rest++mammoth/manfred') 
-  HTTP/1.0 401 Unauthorized
-  Content-Length: 0
-  Content-Type: text/plain
-  WWW-Authenticate: basic realm="Zope"
+  Traceback (most recent call last):
+  ...
+  Unauthorized: (<grokcore.rest.meta.MammothRest object at 0...>, '__call__', 'mammoth.Touch')
 
 However, if we make a (local!) grant, e.g. on the root object, we can
 access the view just fine:

Modified: grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py
===================================================================
--- grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py	2010-12-20 10:27:13 UTC (rev 119014)
+++ grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py	2010-12-20 13:52:57 UTC (rev 119015)
@@ -221,26 +221,16 @@
 random objects without access:
 
   >>> print http('DELETE /app HTTP/1.1')
-  HTTP/1.0 500 Internal Server Error
-  Content-Length: 127
-  Content-Type: text/html;charset=utf-8
-  <BLANKLINE>
-  <html><head><title>ForbiddenAttribute</title></head>
-  <body><h2>ForbiddenAttribute</h2>
-  A server error occurred.
-  </body></html>
-  <BLANKLINE>
+  HTTP/1.0 405 Method Not Allowed
+  Content-Length: 18
+  Allow:
+  Method Not Allowed
 
   >>> print http('DELETE /app/alpha HTTP/1.1')
-  HTTP/1.0 500 Internal Server Error
-  Content-Length: 127
-  Content-Type: text/html;charset=utf-8
-  <BLANKLINE>
-  <html><head><title>ForbiddenAttribute</title></head>
-  <body><h2>ForbiddenAttribute</h2>
-  A server error occurred.
-  </body></html>
-  <BLANKLINE>
+  HTTP/1.0 405 Method Not Allowed
+  Content-Length: 18
+  Allow:
+  Method Not Allowed
 
  We shouldn't be allowed to PUT either::
 



More information about the checkins mailing list