Ignore:
Timestamp:
26 Jan 2011, 12:19:03 (14 years ago)
Author:
uli
Message:
  • Fix imports.
  • Remove tests for applicants plugin. This one moved to applicants.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/tests/test_applicants.py

    r5478 r5688  
    2828from zope.interface import verify
    2929from waeup.sirp.interfaces import IWAeUPSIRPPluggable
    30 from waeup.sirp.jambtables import (
     30from waeup.sirp.applicants.jambtables import (
    3131    ResultEntry, Applicant, ApplicantFactory, ApplicantContainer,
    32     ApplicantsPlugin,
    3332    )
    34 from waeup.sirp.jambtables.interfaces import (
     33from waeup.sirp.applicants.jambtables.interfaces import (
    3534    IResultEntry, IApplicant, IApplicantContainer,
    3635    )
     
    9998        verify.verifyObject(IApplicantContainer, self.container)
    10099
    101 class ApplicantsPluginTest(unittest.TestCase):
    102 
    103     def setUp(self):
    104         self.plugin = ApplicantsPlugin()
    105         self.site1 = dict()
    106         self.site2 = dict(applications = True)
    107         self.log_stream = StringIO()#.open('w')
    108         handler = logging.StreamHandler(self.log_stream)
    109         self.logger = logging.getLogger('waeup.sirp.testing')
    110         self.logger.addHandler(handler)
    111         self.logger.propagate = False
    112         self.logger.setLevel(logging.DEBUG)
    113        
    114     def tearDown(self):
    115         handlers = self.logger.handlers
    116         for handler in handlers:
    117             del handler
    118         pass
    119 
    120     def notest_interfaces(self):
    121         verify.verifyClass(IWAeUPSIRPPluggable, ApplicantsPlugin)
    122         verify.verifyObject(IWAeUPSIRPPluggable, self.plugin)
    123 
    124     def test_setup(self):
    125         self.plugin.setup(self.site1, 'some.site', self.logger)
    126         assert 'Installed application container' in self.log_stream.getvalue()
    127         assert 'applications' in self.site1.keys()
    128 
    129     def test_update_empty_site(self):
    130         self.plugin.update(self.site1, 'some.site', self.logger)
    131         assert 'Updating site' in self.log_stream.getvalue()
    132         assert 'Installing' in self.log_stream.getvalue()
    133 
    134     def test_update_filled_site(self):
    135         self.plugin.update(self.site2, 'some.site', self.logger)
    136         assert 'Nothing to do' in self.log_stream.getvalue()
    137        
    138100
    139101def test_suite():
     
    141103    for testcase in [
    142104        ResultEntryTest, ApplicantTest, ApplicantFactoryTest,
    143         ApplicantContainerTest, ApplicantsPluginTest,
     105        ApplicantContainerTest,
    144106        ]:
    145107        suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
Note: See TracChangeset for help on using the changeset viewer.