[Zope3-checkins] CVS: Zope3/src/zope/app/dav/ftests - dav.py:1.4 test_propfind.py:1.5

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Mar 3 12:07:01 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/dav/ftests
In directory cvs.zope.org:/tmp/cvs-serv16742/src/zope/app/dav/ftests

Modified Files:
	dav.py test_propfind.py 
Log Message:


Changed DAV schemas to be utilities. However, I left the dav:provideInterface
directive in place, since it hides some unnecessary indirections.




=== Zope3/src/zope/app/dav/ftests/dav.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/dav/ftests/dav.py:1.3	Tue Feb 24 11:51:30 2004
+++ Zope3/src/zope/app/dav/ftests/dav.py	Wed Mar  3 12:06:31 2004
@@ -15,7 +15,6 @@
 
 $Id$
 """
-
 from persistent import Persistent
 from transaction import get_transaction
 from zope.interface import implements
@@ -23,8 +22,6 @@
 
 from zope.app.folder import Folder
 from zope.app.interfaces.annotation import IAttributeAnnotatable
-
-__metaclass__ = type
 
 class Page(Persistent):
     implements(IAttributeAnnotatable)    


=== Zope3/src/zope/app/dav/ftests/test_propfind.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/dav/ftests/test_propfind.py:1.4	Mon Mar  1 10:02:49 2004
+++ Zope3/src/zope/app/dav/ftests/test_propfind.py	Wed Mar  3 12:06:31 2004
@@ -15,17 +15,15 @@
 
 $Id$
 """
-
 import unittest
 from datetime import datetime
-from zope.app.dav.ftests.dav import DAVTestCase
-from zope.component import getAdapter
-from zope.app.dublincore.interfaces import IZopeDublinCore
-from zope.app.traversing import traverse
 from transaction import get_transaction
 from zope.pagetemplate.tests.util import normalize_xml
 
-__metaclass__ = type
+from zope.app import zapi
+from zope.app.dav.ftests.dav import DAVTestCase
+from zope.app.dublincore.interfaces import IZopeDublinCore
+from zope.app.traversing import traverse
 
 class TestPROPFIND(DAVTestCase):
 
@@ -37,7 +35,7 @@
     def test_dctitle2(self):
         self.addPage('/pt', u'<span />')
         pt = traverse(self.getRootFolder(), '/pt')
-        adapted = getAdapter(pt, IZopeDublinCore)
+        adapted = zapi.getAdapter(pt, IZopeDublinCore)
         adapted.title = u'Test Title'
         get_transaction().commit()
         self.verifyPropOK(path='/pt', ns='http://purl.org/dc/1.1',
@@ -46,7 +44,7 @@
     def test_dccreated(self):
         self.addPage('/pt', u'<span />')
         pt = traverse(self.getRootFolder(), '/pt')
-        adapted = getAdapter(pt, IZopeDublinCore)
+        adapted = zapi.getAdapter(pt, IZopeDublinCore)
         adapted.created = datetime.utcnow()
         get_transaction().commit()
         expect = str(adapted.created)
@@ -56,7 +54,7 @@
     def test_dcsubject(self):
         self.addPage('/pt', u'<span />')
         pt = traverse(self.getRootFolder(), '/pt')
-        adapted = getAdapter(pt, IZopeDublinCore)
+        adapted = zapi.getAdapter(pt, IZopeDublinCore)
         adapted.subjects = (u'Bla', u'Ble', u'Bli')
         get_transaction().commit()
         expect = ', '.join(adapted.subjects)
@@ -89,6 +87,7 @@
         </response>
         </multistatus>""" % {'ns':ns, 'prop':prop, 'expect':expect})
         self.assertEquals(s1, s2)
+
 
 def test_suite():
     suite = unittest.TestSuite()




More information about the Zope3-Checkins mailing list