[Zope3-checkins] CVS: Zope3/src/zope/app/dav - configure.zcml:1.6 propfind.py:1.4 widget.py:1.2

Sidnei da Silva sidnei@x3ng.com.br
Thu, 22 May 2003 09:59:24 -0400


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

Modified Files:
	configure.zcml propfind.py widget.py 
Log Message:
Slowly getting there. Created a new HTTPTestCase base class for functional tests. Added a few functional tests for DAV and the DC namespace. Still need to solve the minidom issue.

=== Zope3/src/zope/app/dav/configure.zcml 1.5 => 1.6 ===
--- Zope3/src/zope/app/dav/configure.zcml:1.5	Wed May 21 13:26:37 2003
+++ Zope3/src/zope/app/dav/configure.zcml	Thu May 22 09:58:53 2003
@@ -15,8 +15,8 @@
        name="view"
        permission="zope.Public"
        type="zope.publisher.interfaces.http.IHTTPPresentation"
-       factory="zope.app.dav.widget.SimpleDAVWidget"
-       allowed_attributes="getData haveData setData __call__"
+       factory="zope.app.dav.widget.TextDAVWidget"
+       allowed_attributes="getData haveData setData __call__ __str__"
        />
 
  <defaultView
@@ -24,8 +24,8 @@
        name="view"
        permission="zope.Public"
        type="zope.publisher.interfaces.http.IHTTPPresentation"
-       factory="zope.app.dav.widget.SimpleDAVWidget"
-       allowed_attributes="getData haveData setData __call__"
+       factory="zope.app.dav.widget.TextDAVWidget"
+       allowed_attributes="getData haveData setData __call__ __str__"
        />
 
  <defaultView
@@ -33,8 +33,17 @@
        name="view"
        permission="zope.Public"
        type="zope.publisher.interfaces.http.IHTTPPresentation"
-       factory="zope.app.dav.widget.SimpleDAVWidget"
-       allowed_attributes="getData haveData setData __call__"
+       factory="zope.app.dav.widget.TextDAVWidget"
+       allowed_attributes="getData haveData setData __call__ __str__"
+       />
+
+ <defaultView
+       for="zope.schema.interfaces.ISequence"
+       name="view"
+       permission="zope.Public"
+       type="zope.publisher.interfaces.http.IHTTPPresentation"
+       factory="zope.app.dav.widget.SequenceDAVWidget"
+       allowed_attributes="getData haveData setData __call__ __str__"
        />
 
  <adapter


=== Zope3/src/zope/app/dav/propfind.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/dav/propfind.py:1.3	Wed May 21 16:29:46 2003
+++ Zope3/src/zope/app/dav/propfind.py	Thu May 22 09:58:53 2003
@@ -133,7 +133,7 @@
             pstat.appendChild(prop)
             status = response.createElement('status')
             pstat.appendChild(status)
-            text = response.createTextNode('HTTP/1.1 403 Forbidden')
+            text = response.createTextNode('HTTP/1.1 404 Not Found')
             status.appendChild(text)
             count = 0
             for ns in not_avail.keys():


=== Zope3/src/zope/app/dav/widget.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/dav/widget.py:1.1	Wed May 21 12:10:06 2003
+++ Zope3/src/zope/app/dav/widget.py	Thu May 22 09:58:53 2003
@@ -35,3 +35,11 @@
 
     def __call__(self):
         return self.getData()
+
+class TextDAVWidget(SimpleDAVWidget):
+    pass
+
+class SequenceDAVWidget(SimpleDAVWidget):
+
+    def __str__(self):
+        return u', '.join(self._data)