Author: jmorliaguet
Date: Mon Jul  3 11:51:30 2006
New Revision: 3603

Modified:
   cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt
   cpsskins/branches/paris-sprint-2006/doc/portlets.txt

Log:

- set the REQUEST_URI in the test request since the negotiation module
  uses that information



Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt  
(original)
+++ cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt  Mon Jul 
 3 11:51:30 2006
@@ -67,7 +67,6 @@
 Test setup:
 
     >>> from zope.publisher.browser import TestRequest
-    >>> request = TestRequest()
 
     >>> root = getRootFolder()
 
@@ -92,6 +91,7 @@
 
 If nothing is specified, the default theme is returned:
 
+    >>> request = TestRequest(environ={'REQUEST_URI': 
u'/++skin++cpsskins/123'})
     >>> page = negotiation.getPage()
     >>> page.theme, page
     (Theme('Theme 1'), ThemePage('A page'))
@@ -100,7 +100,8 @@
 The page's name can be specified in the URL, by writing
     ...?page=Theme-2:ThemePage
 
-    >>> request.form[u'page'] = u'Theme-2:ThemePage'
+    >>> request = TestRequest(environ={'REQUEST_URI': 
u'/++skin++cpsskins/123'},
+                              form={'page': u'Theme-2:ThemePage'})
     >>> page = negotiation.getPage()
     >>> page.theme, page
     (Theme('Theme 2'), ThemePage('A page'))
@@ -110,6 +111,7 @@
 
 The theme's name can also be specified in a cookie:
 
+    >>> request = TestRequest(environ={'REQUEST_URI': 
u'/++skin++cpsskins/123'})
     >>> request.response.setCookie('cpsskins_page', u'Theme-3:ThemePage')
     >>> page = negotiation.getPage()
     >>> page.theme, page
@@ -118,4 +120,3 @@
     >>> request.response.expireCookie('cpsskins_page')
 
 
-

Modified: cpsskins/branches/paris-sprint-2006/doc/portlets.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/doc/portlets.txt        (original)
+++ cpsskins/branches/paris-sprint-2006/doc/portlets.txt        Mon Jul  3 
11:51:30 2006
@@ -12,7 +12,7 @@
 
     >>> from zope.publisher.browser import TestRequest
     >>> from zope.publisher.interfaces import IRequest
-    >>> request = TestRequest()
+    >>> request = TestRequest(environ={'REQUEST_URI': 
u'/++skin++cpsskins/123'})
     >>> root = getRootFolder()
 
 Portlets use a *context info* structure to transmit data through the
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to