Changeset 7811 for main/waeup.kofa/trunk/src/waeup/kofa/tests
- Timestamp:
- 8 Mar 2012, 19:00:51 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/tests
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_app.py
r7193 r7811 22 22 from zope.component.hooks import setSite 23 23 from zope.interface.verify import verifyClass, verifyObject 24 from waeup. sirp.app import University25 from waeup. sirp.interfaces import IUniversity26 from waeup. sirp.testing import FunctionalLayer, FunctionalTestCase24 from waeup.kofa.app import University 25 from waeup.kofa.interfaces import IUniversity 26 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 27 27 28 28 class UniversityTests(FunctionalTestCase): -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_authentication.py
r7290 r7811 22 22 from zope.pluggableauth.interfaces import IAuthenticatorPlugin 23 23 from zope.securitypolicy.interfaces import IPrincipalRoleManager 24 from waeup. sirp.testing import FunctionalTestCase, FunctionalLayer25 from waeup. sirp.authentication import (26 UserAuthenticatorPlugin, Account, SIRPPrincipalInfo,24 from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer 25 from waeup.kofa.authentication import ( 26 UserAuthenticatorPlugin, Account, KOFAPrincipalInfo, 27 27 get_principal_role_manager) 28 28 … … 64 64 result2 = plugin.authenticateCredentials( 65 65 dict(login='bob', password='nonsense')) 66 self.assertTrue(isinstance(result1, SIRPPrincipalInfo))66 self.assertTrue(isinstance(result1, KOFAPrincipalInfo)) 67 67 self.assertTrue(result2 is None) 68 68 return … … 73 73 result1 = plugin.principalInfo('bob') 74 74 result2 = plugin.principalInfo('manfred') 75 self.assertTrue(isinstance(result1, SIRPPrincipalInfo))75 self.assertTrue(isinstance(result1, KOFAPrincipalInfo)) 76 76 self.assertTrue(result2 is None) 77 77 return -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_configuration.py
r7193 r7811 20 20 from zope.component.interfaces import IFactory 21 21 from zope.interface import verify 22 from waeup. sirp.testing import FunctionalLayer, FunctionalTestCase23 from waeup. sirp.configuration import (22 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 23 from waeup.kofa.configuration import ( 24 24 ConfigurationContainer, SessionConfiguration, SessionConfigurationFactory) 25 from waeup. sirp.interfaces import(25 from waeup.kofa.interfaces import( 26 26 IConfigurationContainer, ISessionConfiguration, ISessionConfigurationAdd) 27 27 -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_doctests.py
r7193 r7811 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """Register doctests for waeup. sirp.18 """Register doctests for waeup.kofa. 19 19 """ 20 from waeup. sirp.testing import get_doctest_suite20 from waeup.kofa.testing import get_doctest_suite 21 21 22 22 def test_suite(): -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_imagestorage.py
r7193 r7811 27 27 from zope.component.hooks import setSite 28 28 from zope.interface.verify import verifyClass, verifyObject 29 from waeup. sirp.app import University30 from waeup. sirp.testing import FunctionalLayer, FunctionalTestCase31 from waeup. sirp.imagestorage import (29 from waeup.kofa.app import University 30 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 31 from waeup.kofa.imagestorage import ( 32 32 FileStoreNameChooser, ExtFileStore, DefaultFileStoreHandler, 33 33 DefaultStorage) 34 from waeup. sirp.interfaces import (34 from waeup.kofa.interfaces import ( 35 35 IFileStoreNameChooser, IExtFileStore, IFileStoreHandler,) 36 36 -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_interfaces.py
r7321 r7811 20 20 import grok 21 21 import unittest 22 from waeup. sirp.interfaces import DuplicationError, RoleSource23 from waeup. sirp.testing import FunctionalLayer, FunctionalTestCase22 from waeup.kofa.interfaces import DuplicationError, RoleSource 23 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 24 24 25 25 class DuplicationErrorTests(unittest.TestCase): … … 48 48 # Register a role not visible to waeup portal as its name does 49 49 # not start with 'waeup.' 50 class Non SIRPRole(grok.Role):50 class NonKOFARole(grok.Role): 51 51 grok.name('nonwaeup.testrole') 52 52 grok.title('Role not suitable for waeup') 53 53 grok.permissions('waeup.Public') 54 54 grok.testing.grok_component('SomeRole', SomeRole) 55 grok.testing.grok_component('Non SIRPRole', NonSIRPRole)55 grok.testing.grok_component('NonKOFARole', NonKOFARole) 56 56 return 57 57 -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_objecthistory.py
r7372 r7811 25 25 from zope.security.management import newInteraction, endInteraction 26 26 from zope.security.testing import Principal, Participation 27 from waeup. sirp.app import University28 from waeup. sirp.interfaces import IObjectHistory, ISIRPObject29 from waeup. sirp.testing import FunctionalTestCase, FunctionalLayer30 from waeup. sirp.objecthistory import ObjectHistory27 from waeup.kofa.app import University 28 from waeup.kofa.interfaces import IObjectHistory, IKOFAObject 29 from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer 30 from waeup.kofa.objecthistory import ObjectHistory 31 31 32 32 class SampleObject(grok.Model): 33 grok.implements(I SIRPObject)33 grok.implements(IKOFAObject) 34 34 pass 35 35 -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_schoolgrades.py
r7795 r7811 2 2 import unittest 3 3 from zope.interface.verify import verifyObject, verifyClass 4 from waeup. sirp.interfaces import IResultEntry, IResultEntryField5 from waeup. sirp.schoolgrades import ResultEntry, ResultEntryField4 from waeup.kofa.interfaces import IResultEntry, IResultEntryField 5 from waeup.kofa.schoolgrades import ResultEntry, ResultEntryField 6 6 7 7 class ResultEntryTests(unittest.TestCase): -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py
r7506 r7811 27 27 from zope.component.hooks import setSite 28 28 from zope.sendmail.interfaces import IMailDelivery 29 from waeup. sirp.app import University30 from waeup. sirp.interfaces import IMailService31 from waeup. sirp.smtp import (29 from waeup.kofa.app import University 30 from waeup.kofa.interfaces import IMailService 31 from waeup.kofa.smtp import ( 32 32 encode_header_item, encode_address, encode_body, FakeSMTPDelivery, 33 33 send_mail) 34 from waeup. sirp.testing import FunctionalLayer, FunctionalTestCase34 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 35 35 36 36 # … … 328 328 'test program', 'no-reply@waeup.org', 329 329 'test mail receiver', EXTERNAL_MAIL_RECEIVER, 330 'Test Mail from WAeUP SIRP',330 'Test Mail from WAeUP KOFA', 331 331 'Hi from test mailer!\n\nRegards,\nTest Programme\n' 332 332 ) … … 345 345 'test program', 'no-reply@waeup.org', 346 346 'test mail receiver', EXTERNAL_MAIL_RECEIVER, 347 'Test Mail from WAeUP SIRP',347 'Test Mail from WAeUP KOFA', 348 348 'Hi from test mailer!\n\nRegards,\nTest Programme\n' 349 349 ) -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_waeup.py
r7193 r7811 17 17 ## 18 18 """ 19 Test setup for the waeup. sirppackage.19 Test setup for the waeup.kofa package. 20 20 """ 21 21 import grok … … 23 23 import zope.component.eventtesting 24 24 from zope.testing import renormalizing 25 from waeup. sirp.testing import FunctionalLayer25 from waeup.kofa.testing import FunctionalLayer 26 26 27 27 def setUpZope(test): … … 32 32 ]) 33 33 34 # Register all tests in the waeup. sirppackage34 # Register all tests in the waeup.kofa package 35 35 test_suite = grok.testing.register_all_tests( 36 'waeup. sirp', checker=checker, usetup=setUpZope,36 'waeup.kofa', checker=checker, usetup=setUpZope, 37 37 layer=FunctionalLayer)
Note: See TracChangeset for help on using the changeset viewer.