[Checkins] SVN: z3c.resourceinclude/trunk/ Fix tests.

Sylvain Viollon sylvain at infrae.com
Thu Apr 9 12:29:48 EDT 2009


Log message for revision 99046:
  Fix tests.
  
  

Changed:
  U   z3c.resourceinclude/trunk/buildout.cfg
  U   z3c.resourceinclude/trunk/z3c/resourceinclude/README.txt
  U   z3c.resourceinclude/trunk/z3c/resourceinclude/configure.zcml
  U   z3c.resourceinclude/trunk/z3c/resourceinclude/testing.py
  U   z3c.resourceinclude/trunk/z3c/resourceinclude/tests/test_doctests.py

-=-
Modified: z3c.resourceinclude/trunk/buildout.cfg
===================================================================
--- z3c.resourceinclude/trunk/buildout.cfg	2009-04-09 16:20:39 UTC (rev 99045)
+++ z3c.resourceinclude/trunk/buildout.cfg	2009-04-09 16:29:48 UTC (rev 99046)
@@ -2,7 +2,16 @@
 develop = .
 parts = test
 find-links = http://download.zope.org/distribution/
+extends = http://download.zope.org/zope3.4/3.4.0/versions.cfg
+versions = versions
 
+# plone.memoize as bad dependencies after.
+# chameleon require a recent version of lxml and zope.i18n.
+[versions]
+plone.memoize = 1.0.4
+zope.i18n = 3.5
+lxml = 2.1.5
+
 [test]
 recipe = zc.recipe.testrunner
 eggs = z3c.resourceinclude

Modified: z3c.resourceinclude/trunk/z3c/resourceinclude/README.txt
===================================================================
--- z3c.resourceinclude/trunk/z3c/resourceinclude/README.txt	2009-04-09 16:20:39 UTC (rev 99045)
+++ z3c.resourceinclude/trunk/z3c/resourceinclude/README.txt	2009-04-09 16:29:48 UTC (rev 99046)
@@ -139,9 +139,9 @@
 
    >>> provider.update()
    >>> print provider.render()
-   <script src="http://nohost/site/@@/mock" type="text/javascript">
+   <script type="text/javascript" src="http://nohost/site/@@/mock">
    </script>
    <style media="all" type="text/css">
        <!-- @import url("http://nohost/site/@@/mock"); -->
    </style>
-   <link href="http://nohost/site/@@/mock" rel="kinetic-stylesheet" type="text/kss" />
+   <link type="text/kss" rel="kinetic-stylesheet" href="http://nohost/site/@@/mock" />

Modified: z3c.resourceinclude/trunk/z3c/resourceinclude/configure.zcml
===================================================================
--- z3c.resourceinclude/trunk/z3c/resourceinclude/configure.zcml	2009-04-09 16:20:39 UTC (rev 99045)
+++ z3c.resourceinclude/trunk/z3c/resourceinclude/configure.zcml	2009-04-09 16:29:48 UTC (rev 99046)
@@ -1,6 +1,8 @@
 <configure xmlns="http://namespaces.zope.org/zope"
 	   xmlns:zcml="http://namespaces.zope.org/zcml">
 
+  <include package="zope.component" file="meta.zcml" />
+
   <adapter
      zcml:condition="have devmode"
      factory=".collector.ResourceCollector" />

Modified: z3c.resourceinclude/trunk/z3c/resourceinclude/testing.py
===================================================================
--- z3c.resourceinclude/trunk/z3c/resourceinclude/testing.py	2009-04-09 16:20:39 UTC (rev 99045)
+++ z3c.resourceinclude/trunk/z3c/resourceinclude/testing.py	2009-04-09 16:29:48 UTC (rev 99046)
@@ -9,11 +9,11 @@
 def setSite():
     hooks.setHooks()
     hooks.setSite(MockSite())
-   
+
 class MockSite(object):
     def getSiteManager(self):
         return component.getSiteManager()
-    
+
 class MockSiteURL(object):
     interface.implements(IAbsoluteURL)
     component.adapts(MockSite, IBrowserRequest)
@@ -30,14 +30,14 @@
 
 class MockResource(Resource):
     __name__ = 'mock'
-    
+
     def __init__(self, request, content_type):
         self.context = MockResourceContext(content_type)
         self.request = request
-        
+
     def browserDefault(self, request):
         return self, ()
-    
+
     def __repr__(self):
         return u'<MockResource type="%s">' % self.context.content_type
 

Modified: z3c.resourceinclude/trunk/z3c/resourceinclude/tests/test_doctests.py
===================================================================
--- z3c.resourceinclude/trunk/z3c/resourceinclude/tests/test_doctests.py	2009-04-09 16:20:39 UTC (rev 99045)
+++ z3c.resourceinclude/trunk/z3c/resourceinclude/tests/test_doctests.py	2009-04-09 16:29:48 UTC (rev 99046)
@@ -7,16 +7,15 @@
 import zope.component
 import zope.component.testing
 import zope.configuration.xmlconfig
-
-import z3c.pt
+import z3c.resourceinclude
 import z3c.resourceinclude.testing
 
 def setUp(suite):
     zope.component.testing.setUp(suite)
     z3c.resourceinclude.testing.setSite()
     zope.component.provideAdapter(z3c.resourceinclude.testing.MockSiteURL)
-    zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
-    
+    zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.resourceinclude)()
+
 def test_suite():
     doctests = ('README.txt', 'zcml.txt')
 



More information about the Checkins mailing list