[Zope3-checkins] CVS: Zope3/src/zope/app/dav/tests - test_propfind.py:1.5
Sidnei da Silva
sidnei@x3ng.com.br
Thu, 22 May 2003 11:11:00 -0400
Update of /cvs-repository/Zope3/src/zope/app/dav/tests
In directory cvs.zope.org:/tmp/cvs-serv14523/src/zope/app/dav/tests
Modified Files:
test_propfind.py
Log Message:
Changed use of encoding in DAV output as suggested by Fred. For UTF-8, the encoding pseudo-attribute of the XML declaration doesn't need to be set: it's UTF-8 by default if it isn't UTF-16.
=== Zope3/src/zope/app/dav/tests/test_propfind.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/dav/tests/test_propfind.py:1.4 Thu May 22 09:58:54 2003
+++ Zope3/src/zope/app/dav/tests/test_propfind.py Thu May 22 11:10:59 2003
@@ -83,7 +83,7 @@
def _createRequest(body=None, headers=None, skip_headers=None):
if body is None:
- body = '''<?xml version="1.0" encoding="utf-8" ?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop xmlns:R="http://www.foo.bar/boxschema/">
@@ -244,7 +244,7 @@
zpt = traverse(root, 'zpt')
dc = getAdapter(zpt, IZopeDublinCore)
dc.title = u'Test Title'
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop xmlns:DC="http://www.purl.org/dc/1.1">
<DC:title />
@@ -257,7 +257,7 @@
'Depth':'0'})
resource_url = str(getView(zpt, 'absolute_url', request))
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>
@@ -285,7 +285,7 @@
zpt = traverse(root, 'zpt')
dc = getAdapter(zpt, IZopeDublinCore)
dc.created = datetime.utcnow()
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop xmlns:DC="http://www.purl.org/dc/1.1">
<DC:created />
@@ -298,7 +298,7 @@
'Depth':'0'})
resource_url = str(getView(zpt, 'absolute_url', request))
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>
@@ -327,7 +327,7 @@
zpt = traverse(root, 'zpt')
dc = getAdapter(zpt, IZopeDublinCore)
dc.subjects = (u'Bla', u'Ble', u'Bli')
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<prop xmlns:DC="http://www.purl.org/dc/1.1">
<DC:subjects />
@@ -340,7 +340,7 @@
'Depth':'0'})
resource_url = str(getView(zpt, 'absolute_url', request))
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>
@@ -367,7 +367,7 @@
def test_davpropname(self):
root = self.rootFolder
zpt = traverse(root, 'zpt')
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<propname/>
</propfind>
@@ -385,7 +385,7 @@
props = getFieldNamesInOrder(IDAVSchema)
for p in props:
props_xml += '<%s/>' % p
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>
@@ -412,7 +412,7 @@
def test_davpropnamefolderdepth0(self):
root = self.rootFolder
folder = traverse(root, 'folder')
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<propname/>
</propfind>
@@ -430,7 +430,7 @@
props = getFieldNamesInOrder(IDAVSchema)
for p in props:
props_xml += '<%s/>' % p
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>
@@ -458,7 +458,7 @@
def test_davpropnamefolderdepth1(self):
root = self.rootFolder
folder = traverse(root, 'folder')
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<propname/>
</propfind>
@@ -476,7 +476,7 @@
props = getFieldNamesInOrder(IDAVSchema)
for p in props:
props_xml += '<%s/>' % p
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>
@@ -504,7 +504,7 @@
def test_davpropnamefolderdepthinfinity(self):
root = self.rootFolder
folder = traverse(root, 'folder')
- body = '''<?xml version="1.0" encoding="utf-8"?>
+ body = '''<?xml version="1.0" ?>
<propfind xmlns="DAV:">
<propname/>
</propfind>
@@ -522,7 +522,7 @@
props = getFieldNamesInOrder(IDAVSchema)
for p in props:
props_xml += '<%s/>' % p
- expect = '''<?xml version="1.0" encoding="utf-8"?>
+ expect = '''<?xml version="1.0" ?>
<multistatus xmlns="DAV:">
<response>
<href>%(resource_url)s</href>