[Checkins] SVN: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/ Add test for sub-directories of DirectoryResource objects. Ignore the hash in tests, as the result differs between machines.

Jan-Jaap Driessen jdriessen at thehealthagency.com
Mon Nov 15 12:09:02 EST 2010


Log message for revision 118416:
  Add test for sub-directories of DirectoryResource objects. Ignore the hash in tests, as the result differs between machines.

Changed:
  U   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/README.txt
  A   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/foo_dir/sub/
  A   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/foo_dir/sub/evencaveman.jpg
  U   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/test_inline_resource.pt
  U   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/tests.py

-=-
Modified: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/README.txt
===================================================================
--- hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/README.txt	2010-11-15 17:01:00 UTC (rev 118415)
+++ hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/README.txt	2010-11-15 17:09:01 UTC (rev 118416)
@@ -26,7 +26,7 @@
   >>> print browser.contents
   <html>
   <head>
-      <script type="text/javascript" src="http://localhost/media/foo/hash:2258902149/a.js"></script>
+      <script type="text/javascript" src="http://localhost/media/foo/hash:.../a.js"></script>
   <BLANKLINE>
   </head>
   <body>
@@ -41,8 +41,8 @@
   >>> print browser.contents
   <html>
   <head>
-      <script type="text/javascript" src="http://localhost/media/foo/hash:2258902149/a.js"></script>
-    <script type="text/javascript" src="http://localhost/media/foo/hash:2258902149/b.js"></script>
+      <script type="text/javascript" src="http://localhost/media/foo/hash:.../a.js"></script>
+    <script type="text/javascript" src="http://localhost/media/foo/hash:.../b.js"></script>
   <BLANKLINE>
   </head>
   <body>
@@ -60,15 +60,15 @@
   </head>
   <body>
   <p>the widget HTML itself</p>
-  <script type="text/javascript" src="http://localhost/media/foo/hash:2258902149/a.js"></script>
-  <script type="text/javascript" src="http://localhost/media/foo/hash:2258902149/b.js"></script></body>
+  <script type="text/javascript" src="http://localhost/media/foo/hash:.../a.js"></script>
+  <script type="text/javascript" src="http://localhost/media/foo/hash:.../b.js"></script></body>
   </html>
 
 In-template resources
 ---------------------
 
-Hurry.zoperesource also provides support for rendering URLs to in-template
-resources::
+Hurry.zoperesource provides support for rendering resource publisher aware URLs
+to in-template resources::
 
   >>> browser.open('http://localhost/hurry.zoperesource.test_inline_resource')
   >>> print browser.contents
@@ -76,7 +76,8 @@
   <head>
   </head>
   <body>
-    <img src="http://localhost/media/foo/hash:2258902149/evencaveman.jpg"/>
+    <img src="http://localhost/media/foo/hash:.../evencaveman.jpg"/>
+    <img src="http://localhost/media/foo/hash:.../sub/evencaveman.jpg"/>
   </body>
   </html>
 

Added: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/foo_dir/sub/evencaveman.jpg
===================================================================
(Binary files differ)


Property changes on: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/foo_dir/sub/evencaveman.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/test_inline_resource.pt
===================================================================
--- hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/test_inline_resource.pt	2010-11-15 17:01:00 UTC (rev 118415)
+++ hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/test_inline_resource.pt	2010-11-15 17:09:01 UTC (rev 118416)
@@ -3,6 +3,7 @@
 </head>
 <body>
   <img tal:attributes="src context/++resource++foo/evencaveman.jpg"/>
+  <img tal:attributes="src context/++resource++foo/sub/evencaveman.jpg"/>
 </body>
 </html>
 

Modified: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/tests.py
===================================================================
--- hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/tests.py	2010-11-15 17:01:00 UTC (rev 118415)
+++ hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/tests/tests.py	2010-11-15 17:09:01 UTC (rev 118416)
@@ -32,6 +32,6 @@
 def test_suite():
     readme = doctest.DocFileSuite(
         '../README.txt',
-        optionflags=doctest.NORMALIZE_WHITESPACE)
+        optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS)
     readme.layer = HurryResourceBrowserLayer(hurry.zoperesource.tests)
     return unittest.TestSuite([readme])



More information about the checkins mailing list