[Zope3-checkins] CVS: Zope3/src/zope/app/component/tests - module.py:1.2 test_contentdirective.py:1.3 test_directives.py:1.11 test_factory.py:1.4 test_requirepermissions.py:1.4 test_servicedirective.py:1.7

Philipp von Weitershausen philikon@philikon.de
Sat, 2 Aug 2003 03:04:42 -0400


Update of /cvs-repository/Zope3/src/zope/app/component/tests
In directory cvs.zope.org:/tmp/cvs-serv29115/component/tests

Modified Files:
	module.py test_contentdirective.py test_directives.py 
	test_factory.py test_requirepermissions.py 
	test_servicedirective.py 
Log Message:
Converted the three most important packages that define ZCML directives
to the new ZCML architecture (using schemas):

- zope.app.component

- zope.app.browser

- zope.app.publisher.browser


=== Zope3/src/zope/app/component/tests/module.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/component/tests/module.py:1.1	Mon May 12 12:32:40 2003
+++ Zope3/src/zope/app/component/tests/module.py	Sat Aug  2 03:04:05 2003
@@ -50,7 +50,7 @@
     bar2 = Text()
 
 
-template_bracket = """<zopeConfigure
+template_bracket = """<configure
    xmlns="http://namespaces.zope.org/zope">
    %s
-</zopeConfigure>"""
+</configure>"""


=== Zope3/src/zope/app/component/tests/test_contentdirective.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/component/tests/test_contentdirective.py:1.2	Mon Jul 28 18:19:59 2003
+++ Zope3/src/zope/app/component/tests/test_contentdirective.py	Sat Aug  2 03:04:05 2003
@@ -38,10 +38,10 @@
 
 
 def configfile(s):
-    return StringIO("""<zopeConfigure
+    return StringIO("""<configure
       xmlns='http://namespaces.zope.org/zope'>
       %s
-      </zopeConfigure>
+      </configure>
       """ % s)
 
 class TestContentDirective(PlacelessSetup, unittest.TestCase):


=== Zope3/src/zope/app/component/tests/test_directives.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/component/tests/test_directives.py:1.10	Mon Jul 28 18:19:59 2003
+++ Zope3/src/zope/app/component/tests/test_directives.py	Sat Aug  2 03:04:05 2003
@@ -37,11 +37,11 @@
 from zope.interface import implements
 
 
-template = """<zopeConfigure
+template = """<configure
    xmlns='http://namespaces.zope.org/zope'
    xmlns:test='http://www.zope.org/NS/Zope3/test'>
    %s
-   </zopeConfigure>"""
+   </configure>"""
 
 class Ob:
     implements(IC)
@@ -479,18 +479,11 @@
                id="foo"
                component="zope.component.tests.factory.f"
                />
-            <factory
-               component="zope.component.tests.factory.f"
-               />
             """
             )))
 
         from zope.component.tests.factory import X
         self.assertEqual(createObject(None, 'foo').__class__, X)
-        self.assertEqual(createObject(
-            None,
-            'zope.component.tests.factory.f').__class__, X)
-
 
 def test_suite():
     return unittest.makeSuite(Test)


=== Zope3/src/zope/app/component/tests/test_factory.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/component/tests/test_factory.py:1.3	Mon Jul 28 18:19:59 2003
+++ Zope3/src/zope/app/component/tests/test_factory.py	Sat Aug  2 03:04:05 2003
@@ -29,10 +29,10 @@
 from zope.app.component.tests.exampleclass import ExampleClass
 
 def configfile(s):
-    return StringIO("""<zopeConfigure
+    return StringIO("""<configure
       xmlns='http://namespaces.zope.org/zope'>
       %s
-      </zopeConfigure>
+      </configure>
       """ % s)
 
 class Test(PlacelessSetup, unittest.TestCase):
@@ -42,7 +42,6 @@
         XMLConfig('meta.zcml', zope.app.component)()
         XMLConfig('meta.zcml', zope.app.security)()
 
-
     def testFactory(self):
         from zope.component import getService
         from zope.proxy import removeAllProxies
@@ -61,26 +60,6 @@
         obj = getService(None, Factories).createObject('Example')
         obj = removeAllProxies(obj)
         self.failUnless(isinstance(obj, ExampleClass))
-
-    def testFactoryDefaultId(self):
-        from zope.component import getService
-        from zope.proxy import removeAllProxies
-        f = configfile("""
-<permission id="zope.Foo" title="Zope Foo Permission" />
-<content class="zope.app.component.tests.exampleclass.ExampleClass">
-    <factory
-      permission="zope.Foo"
-      title="Example content"
-      description="Example description"
-       />
-</content>
-                       """)
-        xmlconfig(f)
-        obj = getService(None, Factories).createObject(
-            'zope.app.component.tests.exampleclass.ExampleClass')
-        obj = removeAllProxies(obj)
-        self.failUnless(isinstance(obj, ExampleClass))
-
 
 def test_suite():
     loader=unittest.TestLoader()


=== Zope3/src/zope/app/component/tests/test_requirepermissions.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/component/tests/test_requirepermissions.py:1.3	Mon Jul 28 18:19:59 2003
+++ Zope3/src/zope/app/component/tests/test_requirepermissions.py	Sat Aug  2 03:04:05 2003
@@ -33,11 +33,11 @@
 def defineDirectives():
     XMLConfig('meta.zcml', zope.app.component)()
     XMLConfig('meta.zcml', zope.app.security)()
-    xmlconfig(StringIO("""<zopeConfigure
+    xmlconfig(StringIO("""<configure
         xmlns='http://namespaces.zope.org/zope' >
        <permission id="extravagant" title="extravagant" />
        <permission id="paltry" title="paltry" />
-    </zopeConfigure>"""))
+    </configure>"""))
 
 NOTSET = []
 


=== Zope3/src/zope/app/component/tests/test_servicedirective.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/component/tests/test_servicedirective.py:1.6	Mon Jul 28 18:21:27 2003
+++ Zope3/src/zope/app/component/tests/test_servicedirective.py	Sat Aug  2 03:04:05 2003
@@ -26,13 +26,11 @@
 from zope.component import getService
 from zope.app.tests.placelesssetup import PlacelessSetup
 
-
-template = """<zopeConfigure
+template = """<configure
    xmlns='http://namespaces.zope.org/zope'
    xmlns:test='http://www.zope.org/NS/Zope3/test'>
    %s
-   </zopeConfigure>"""
-
+   </configure>"""
 
 class Test(PlacelessSetup, unittest.TestCase):