[Zope3-checkins] CVS: Products3/bugtracker/tests - placelesssetup.py:1.3 test_xmlrpc.py:1.4
Stephan Richter
srichter@cosmos.phy.tufts.edu
Mon, 28 Jul 2003 16:38:45 -0400
Update of /cvs-repository/Products3/bugtracker/tests
In directory cvs.zope.org:/tmp/cvs-serv13012/tests
Modified Files:
placelesssetup.py test_xmlrpc.py
Log Message:
More tests in the browser code.
=== Products3/bugtracker/tests/placelesssetup.py 1.2 => 1.3 ===
--- Products3/bugtracker/tests/placelesssetup.py:1.2 Mon Jul 28 13:13:48 2003
+++ Products3/bugtracker/tests/placelesssetup.py Mon Jul 28 16:38:38 2003
@@ -29,10 +29,12 @@
from zope.app.interfaces.dublincore import IWriteZopeDublinCore
from zope.app.interfaces.dublincore import IZopeDublinCore
from zope.app.interfaces.security import IAuthenticationService
+from zope.app.interfaces.size import ISized
from zope.app.interfaces.traversing import IContainmentRoot, ITraverser
from zope.app.interfaces.traversing import ITraversable, IPhysicallyLocatable
from zope.app.security.registries.principalregistry import principalRegistry
from zope.app.services.servicenames import Authentication
+from zope.app.size import DefaultSized
from zope.app.traversing.adapters import DefaultTraversable, Traverser
from zope.app.traversing.adapters import WrapperPhysicallyLocatable
from zope.component import getAdapter
@@ -75,6 +77,7 @@
provideAdapter(None, IPhysicallyLocatable, WrapperPhysicallyLocatable)
provideAdapter(None, ITraverser, Traverser)
provideAdapter(None, ITraversable, DefaultTraversable)
+ provideAdapter(None, ISized, DefaultSized)
provideAdapter(IBugTracker, IStatusVocabulary, StatusVocabulary)
provideAdapter(IBugTracker, IPriorityVocabulary, PriorityVocabulary)
@@ -95,6 +98,8 @@
'srichter', 'foo')
principalRegistry.definePrincipal(2, 'Jim Fulton', '',
'jim', 'bar')
+ principalRegistry.definePrincipal(3, 'Steve Alexander', '',
+ 'stevea', 'blah')
def generateTracker(self):
@@ -125,12 +130,19 @@
bug.description = u'This is Bug %i.' %id
dc = getAdapter(bug, IZopeDublinCore)
dc.created = datetime(2003, 03, 02+id, 03, 00, 00)
- dc.created = datetime(2003, 03, 02+id, 04, 00, 00)
+ dc.modified = datetime(2003, 03, 02+id, 04, 00, 00)
dc.creators = [u'srichter']
+ bug.owners = [2, 3]
comment = Comment()
+ dc = getAdapter(comment, IZopeDublinCore)
+ dc.creators = [u'srichter']
+ dc.created = datetime(2003, 03, 02+id, 05, 00, 00)
comment.body = 'This is comment 1.'
bug.setObject('comment1', comment)
attach = File()
+ dc = getAdapter(comment, IZopeDublinCore)
+ dc.creators = [u'srichter']
+ dc.created = datetime(2003, 03, 02+id, 06, 00, 00)
attach.data = 'This is an attachment.'
bug.setObject('attach.txt', attach)
return bug
=== Products3/bugtracker/tests/test_xmlrpc.py 1.3 => 1.4 ===
--- Products3/bugtracker/tests/test_xmlrpc.py:1.3 Mon Jul 28 13:13:48 2003
+++ Products3/bugtracker/tests/test_xmlrpc.py Mon Jul 28 16:38:38 2003
@@ -78,7 +78,7 @@
self.assertEqual(props['priority'], 'normal')
self.assertEqual(props['release'], 'None')
self.assertEqual(props['dependencies'], ())
- self.assertEqual(props['owners'], [])
+ self.assertEqual(props['owners'], ['jim', 'stevea'])
def test_setProperties(self):
self.methods.setProperties(type='feature')