[CMF-checkins] CVS: Products/CMFDefault/tests -
test_DiscussionReply.py:1.4 test_Image.py:1.10
test_Portal.py:1.8 test_join.py:1.13
Jens Vagelpohl
jens at dataflake.org
Mon Feb 28 16:35:14 EST 2005
Update of /cvs-repository/Products/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv12263/CMFDefault/tests
Modified Files:
test_DiscussionReply.py test_Image.py test_Portal.py
test_join.py
Log Message:
- Converting from using manage_addCMFSite to the now-preferred
CMFSetup.factory.addConfiguredSite. No deprecation warnings anymore.
=== Products/CMFDefault/tests/test_DiscussionReply.py 1.3 => 1.4 ===
--- Products/CMFDefault/tests/test_DiscussionReply.py:1.3 Fri Jan 21 17:00:13 2005
+++ Products/CMFDefault/tests/test_DiscussionReply.py Mon Feb 28 16:34:44 2005
@@ -19,7 +19,8 @@
def setUp(self):
RequestTest.setUp(self)
try:
- self.root.manage_addProduct['CMFDefault'].manage_addCMFSite('cmf')
+ factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory('cmf', 'default', snapshot=False)
self.portal = self.root.cmf
# Become a Manager
self.uf = self.portal.acl_users
=== Products/CMFDefault/tests/test_Image.py 1.9 => 1.10 ===
--- Products/CMFDefault/tests/test_Image.py:1.9 Wed Nov 24 10:12:31 2004
+++ Products/CMFDefault/tests/test_Image.py Mon Feb 28 16:34:44 2005
@@ -72,7 +72,8 @@
RequestTest.setUp(self)
try:
newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
- self.root.manage_addProduct['CMFDefault'].manage_addCMFSite('cmf')
+ factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory('cmf', 'default', snapshot=False)
self.site = self.root.cmf
self.site.invokeFactory('File', id='file')
self.site.portal_workflow.doActionFor(self.site.file, 'publish')
=== Products/CMFDefault/tests/test_Portal.py 1.7 => 1.8 ===
--- Products/CMFDefault/tests/test_Portal.py:1.7 Thu Aug 12 11:07:41 2004
+++ Products/CMFDefault/tests/test_Portal.py Mon Feb 28 16:34:44 2005
@@ -29,9 +29,9 @@
def _makeSite( self, id='testsite' ):
- from Products.CMFDefault.Portal import manage_addCMFSite
+ from Products.CMFSetup.factory import addConfiguredSite
- manage_addCMFSite( self.root, id )
+ addConfiguredSite(self.root, id, 'default', snapshot=False)
return getattr( self.root, id )
def _makeContent( self, site, portal_type, id='document', **kw ):
=== Products/CMFDefault/tests/test_join.py 1.12 => 1.13 ===
--- Products/CMFDefault/tests/test_join.py:1.12 Fri Oct 29 10:28:32 2004
+++ Products/CMFDefault/tests/test_join.py Mon Feb 28 16:34:44 2005
@@ -9,7 +9,8 @@
class MembershipTests( TransactionalTest ):
def test_join( self ):
- self.root.manage_addProduct[ 'CMFDefault' ].manage_addCMFSite( 'site' )
+ factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory('site', 'default', snapshot=False)
site = self.root.site
member_id = 'test_user'
site.portal_registration.addMember( member_id
@@ -22,7 +23,8 @@
self.failUnless(u)
def test_join_without_email( self ):
- self.root.manage_addProduct[ 'CMFDefault' ].manage_addCMFSite( 'site' )
+ factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory('site', 'default', snapshot=False)
site = self.root.site
self.assertRaises(ValueError,
site.portal_registration.addMember,
@@ -32,7 +34,8 @@
)
def test_join_with_variable_id_policies( self ):
- self.root.manage_addProduct[ 'CMFDefault' ].manage_addCMFSite( 'site' )
+ factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory('site', 'default', snapshot=False)
site = self.root.site
member_id = 'test.user'
More information about the CMF-checkins
mailing list