[Erp5-report] r8798 - /erp5/trunk/products/ERP5Security/tests/testERP5Security.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 26 14:42:11 CEST 2006
Author: jerome
Date: Wed Jul 26 14:42:09 2006
New Revision: 8798
URL: http://svn.erp5.org?rev=8798&view=rev
Log:
fix typos and move person creation in a method.
Modified:
erp5/trunk/products/ERP5Security/tests/testERP5Security.py
Modified: erp5/trunk/products/ERP5Security/tests/testERP5Security.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/tests/testERP5Security.py?rev=8798&r1=8797&r2=8798&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/tests/testERP5Security.py (original)
+++ erp5/trunk/products/ERP5Security/tests/testERP5Security.py Wed Jul 26 14:42:09 2006
@@ -47,7 +47,7 @@
from Interface.Verify import verifyClass
class TestERP5Security(ERP5TypeTestCase):
- """Test invoice are created from orders then packing lists. """
+ """Test ERP5 Security."""
RUN_ALL_TESTS = 1
@@ -67,7 +67,7 @@
newSecurityManager(None, user)
def test_GroupManagerInterfaces(self, run=RUN_ALL_TESTS):
- """Tests group manager pluign respects interfaces."""
+ """Tests group manager plugin respects interfaces."""
if not run:
return
from Products.PluggableAuthService.interfaces.plugins import IGroupsPlugin
@@ -75,7 +75,7 @@
verifyClass(IGroupsPlugin, ERP5GroupManager)
def test_UserManagerInterfaces(self, run=RUN_ALL_TESTS):
- """Tests user manager pluign respects interfaces."""
+ """Tests user manager plugin respects interfaces."""
if not run:
return
from Products.PluggableAuthService.interfaces.plugins import\
@@ -85,7 +85,7 @@
verifyClass(IUserEnumerationPlugin, ERP5UserManager)
def test_RolesManagerInterfaces(self, run=RUN_ALL_TESTS):
- """Tests group manager pluign respects interfaces."""
+ """Tests group manager plugin respects interfaces."""
if not run:
return
from Products.PluggableAuthService.interfaces.plugins import IRolesPlugin
@@ -99,18 +99,22 @@
self.failUnless(isinstance(self.getPortal().acl_users,
PluggableAuthService.PluggableAuthService))
+ def _makePerson(self, **kw):
+ """Creates a person in person module, and returns the object, after
+ indexing is done. """
+ person_module = self.getPersonModule()
+ new_person = person_module.newContent(
+ portal_type='Person', **kw)
+ get_transaction().commit()
+ self.tic()
+ return new_person
+
def test_MultiplePersonReference(self, run=RUN_ALL_TESTS):
- """Tests that it's refused to create two Person with same reference."""
+ """Tests that it's refused to create two Persons with same reference."""
if not run:
return
- person_module = self.getPersonModule()
- new_person = person_module.newContent(
- portal_type='Person',
- reference='new_person')
- get_transaction().commit()
- self.tic()
- self.assertRaises(RuntimeError, person_module.newContent,
- portal_type='Person', reference='new_person')
+ self._makePerson(reference='new_person')
+ self.assertRaises(RuntimeError, self._makePerson, reference='new_person')
if __name__ == '__main__':
framework()
More information about the Erp5-report
mailing list