[CMF-checkins] CVS: Products/CMFCalendar/tests - test_Event.py:1.9
Stefan H. Holek
stefan at epy.co.at
Sat Jul 31 10:07:08 EDT 2004
Update of /cvs-repository/Products/CMFCalendar/tests
In directory cvs.zope.org:/tmp/cvs-serv23861/CMFCalendar/tests
Modified Files:
test_Event.py
Log Message:
WebDAV PUT() caused improper splitting of 'Contributors' metadata header.
=== Products/CMFCalendar/tests/test_Event.py 1.8 => 1.9 ===
--- Products/CMFCalendar/tests/test_Event.py:1.8 Mon Apr 26 08:14:16 2004
+++ Products/CMFCalendar/tests/test_Event.py Sat Jul 31 10:06:33 2004
@@ -25,6 +25,7 @@
from Products.CMFCalendar.Event import Event
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
+from Products.CMFCore.tests.base.testcase import RequestTest
class TestEvent(TestCase):
@@ -75,9 +76,35 @@
)
+class EventPUTTests(RequestTest):
+
+ def setUp(self):
+ RequestTest.setUp(self)
+ self.site = DummySite('site')
+ self.site._setObject( 'portal_membership', DummyTool() )
+
+ def _makeOne(self, id, *args, **kw):
+ return self.site._setObject( id, Event(id, *args, **kw) )
+
+ def test_PutWithoutMetadata(self):
+ self.REQUEST['BODY'] = ''
+ d = self._makeOne('foo')
+ d.PUT(self.REQUEST, self.RESPONSE)
+ self.assertEqual( d.Title(), '' )
+ self.assertEqual( d.Format(), 'text/plain' )
+ 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_suite():
return TestSuite((
makeSuite(TestEvent),
+ makeSuite(EventPUTTests),
))
if __name__ == '__main__':
More information about the CMF-checkins
mailing list