[CMF-checkins] CVS: Products/CMFDefault/tests - test_Document.py:1.28.4.2 test_Link.py:1.9.38.2

Stefan H. Holek stefan at epy.co.at
Sun Jul 25 16:12:18 EDT 2004


Update of /cvs-repository/Products/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv20190/CMFDefault/tests

Modified Files:
      Tag: CMF-1_4-branch
	test_Document.py test_Link.py 
Log Message:
WebDAV PUT caused improper splitting of the 'Contributors' metadata header.
Also see http://plone.org/collector/3217


=== Products/CMFDefault/tests/test_Document.py 1.28.4.1 => 1.28.4.2 ===
--- Products/CMFDefault/tests/test_Document.py:1.28.4.1	Thu Apr 22 13:47:55 2004
+++ Products/CMFDefault/tests/test_Document.py	Sun Jul 25 16:12:17 2004
@@ -441,6 +441,21 @@
         self.assertEqual( self.d.Description(), 'Describe me' )
         self.assertEqual( r.status, 204 )
 
+    def test_PutHtmlWithoutMetadata(self):
+        self.REQUEST['BODY'] = HTML_TEMPLATE % {'title': 'Foo', 'body': 'Bar'}
+        d = self.d
+        r = d.PUT(self.REQUEST, self.RESPONSE)
+        self.assertEqual( d.Title(), 'Foo' )
+        self.assertEqual( d.Format(), 'text/html' )
+        self.assertEqual( d.Description(), '' )
+        self.assertEqual( d.Subject(), () )
+        self.assertEqual( d.Contributors(), () )
+        self.assertEqual( d.EffectiveDate(), 'None' )
+        self.assertEqual( d.ExpirationDate(), 'None' )
+        self.assertEqual( d.Language(), '' )
+        self.assertEqual( d.Rights(), '' )
+        self.assertEqual( r.status, 204 )
+
 
 def test_suite():
     return TestSuite((


=== Products/CMFDefault/tests/test_Link.py 1.9.38.1 => 1.9.38.2 ===
--- Products/CMFDefault/tests/test_Link.py:1.9.38.1	Thu Apr 22 13:47:55 2004
+++ Products/CMFDefault/tests/test_Link.py	Sun Jul 25 16:12:17 2004
@@ -77,6 +77,19 @@
         self.assertEqual( len(d.Subject()), 3 )
         self.assertEqual( d.getRemoteUrl(), 'http://www.zope.org' )
 
+    def test_PutWithoutMetadata(self):
+        d = Link( 'foo' )
+        d._writeFromPUT( body='' )
+        self.assertEqual( d.Title(), '' )
+        self.assertEqual( d.Format(), 'text/url' )
+        self.assertEqual( d.Description(), '' )
+        self.assertEqual( d.Subject(), () )
+        self.assertEqual( d.Contributors(), () )
+        self.assertEqual( d.EffectiveDate(), 'None' )
+        self.assertEqual( d.ExpirationDate(), 'None' )
+        self.assertEqual( d.Language(), '' )
+        self.assertEqual( d.Rights(), '' )
+
     def test_fixupMissingScheme(self):
         table = {
             'http://foo.com':      'http://foo.com',



More information about the CMF-checkins mailing list