Ignore:
Timestamp:
25 Jan 2011, 13:21:00 (14 years ago)
Author:
Henrik Bettermann
Message:

Rename applications to applicants.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
2 edited
1 moved

Legend:

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

    r5647 r5676  
    2121##
    2222"""
    23 Tests for application containers.
     23Tests for applicants containers.
    2424"""
    2525import unittest
    2626from zope.interface.verify import verifyClass, verifyObject
    27 from waeup.sirp.applications import interfaces
    28 from waeup.sirp.applications.container import ApplicationContainer
     27from waeup.sirp.applicants import interfaces
     28from waeup.sirp.applicants.container import ApplicantsContainer
    2929
    30 class ApplicationContainerTestCase(unittest.TestCase):
     30class ApplicantsContainerTestCase(unittest.TestCase):
    3131
    3232    def test_interfaces(self):
     
    3434        self.assertTrue(
    3535            verifyClass(
    36                 interfaces.IApplicationContainer, ApplicationContainer)
     36                interfaces.IApplicantsContainer, ApplicantsContainer)
    3737            )
    3838        self.assertTrue(
    3939            verifyObject(
    40                 interfaces.IApplicationContainer, ApplicationContainer())
     40                interfaces.IApplicantsContainer, ApplicantsContainer())
    4141            )
    4242        return
     
    4646    suite.addTests(
    4747        unittest.TestLoader().loadTestsFromTestCase(
    48             ApplicationContainerTestCase,
     48            ApplicantsContainerTestCase,
    4949            )
    5050        )
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_root.py

    r5659 r5676  
    2121##
    2222"""
    23 Test applications root.
     23Test applicants root.
    2424"""
    2525import logging
     
    2727from StringIO import StringIO
    2828from zope.interface.verify import verifyClass, verifyObject
    29 from waeup.sirp.applications import interfaces
    30 from waeup.sirp.applications.root import (
    31     ApplicationsRoot, ApplicationsPlugin,
     29from waeup.sirp.applicants import interfaces
     30from waeup.sirp.applicants.root import (
     31    ApplicantsRoot, ApplicantsPlugin,
    3232    )
    3333
     
    3535    pass
    3636
    37 class ApplicationsRootTestCase(unittest.TestCase):
     37class ApplicantsRootTestCase(unittest.TestCase):
    3838
    3939    def test_interfaces(self):
     
    4141        self.assertTrue(
    4242            verifyClass(
    43                 interfaces.IApplicationsRoot, ApplicationsRoot)
     43                interfaces.IApplicantsRoot, ApplicantsRoot)
    4444            )
    4545        self.assertTrue(
    4646            verifyObject(
    47                 interfaces.IApplicationsRoot, ApplicationsRoot())
     47                interfaces.IApplicantsRoot, ApplicantsRoot())
    4848            )
    4949        return
    5050
    51 class ApplicationsRootPluginTestCase(unittest.TestCase):
     51class ApplicantsRootPluginTestCase(unittest.TestCase):
    5252    def create_logger(self):
    5353        # create a logger suitable for local tests.
    54         test_logger = logging.getLogger('waeup.sirp.applications.testlogger')
     54        test_logger = logging.getLogger('waeup.sirp.applicants.testlogger')
    5555        log = StringIO()
    5656        handler = logging.StreamHandler(log)
     
    8383    # Real tests start here...
    8484    def test_pluginsetup(self):
    85         # Make sure we can add ApplicationsRoot to sites.
     85        # Make sure we can add ApplicantsRoot to sites.
    8686        site = FakeSite()
    87         plugin = ApplicationsPlugin()
     87        plugin = ApplicantsPlugin()
    8888        plugin.setup(site, 'blah', self.logger)
    89         self.assertTrue('applications' in site.keys())
     89        self.assertTrue('applicants' in site.keys())
    9090        log = self.get_log()
    91         self.assertTrue('Installed applications root.' in log)
     91        self.assertTrue('Installed applicants root.' in log)
    9292        return
    9393
    9494    def test_update_new(self):
    95         # Run update on a site without applications root.
     95        # Run update on a site without applicants root.
    9696        site = FakeSite()
    97         plugin = ApplicationsPlugin()
     97        plugin = ApplicantsPlugin()
    9898        plugin.update(site, 'blah', self.logger)
    99         self.assertTrue('applications' in site.keys())
     99        self.assertTrue('applicants' in site.keys())
    100100        log = self.get_log()
    101101        self.assertTrue('Updating site at Unnamed Site' in log)
    102         self.assertTrue('Installed applications root.' in log)
     102        self.assertTrue('Installed applicants root.' in log)
    103103        return
    104104
    105105    def test_update_outdated(self):
    106         # Run update on a site with outdated applications root.
     106        # Run update on a site with outdated applicants root.
    107107        site = FakeSite()
    108         root = object() # # This is not a proper applications root
    109         site['applications'] = root
    110         plugin = ApplicationsPlugin()
     108        root = object() # # This is not a proper applicants root
     109        site['applicants'] = root
     110        plugin = ApplicantsPlugin()
    111111        plugin.update(site, 'blah', self.logger)
    112         self.assertTrue(site['applications'] is not root)
    113         self.assertTrue(isinstance(site['applications'], ApplicationsRoot))
     112        self.assertTrue(site['applicants'] is not root)
     113        self.assertTrue(isinstance(site['applicants'], ApplicantsRoot))
    114114        log = self.get_log()
    115         self.assertTrue('Outdated applications folder detected' in log)
     115        self.assertTrue('Outdated applicants folder detected' in log)
    116116        self.assertTrue('Updating site at Unnamed Site' in log)
    117         self.assertTrue('Installed applications root.' in log)
     117        self.assertTrue('Installed applicants root.' in log)
    118118        return
    119119
    120120    def test_update_uptodate(self):
    121         # Run update on a site with proper applications root.
     121        # Run update on a site with proper applicants root.
    122122        site = FakeSite()
    123         root = ApplicationsRoot()
    124         site['applications'] = root
    125         plugin = ApplicationsPlugin()
     123        root = ApplicantsRoot()
     124        site['applicants'] = root
     125        plugin = ApplicantsPlugin()
    126126        plugin.update(site, 'blah', self.logger)
    127         self.assertTrue(site['applications'] is root)
     127        self.assertTrue(site['applicants'] is root)
    128128        log = self.get_log()
    129129        self.assertTrue('Updating site at Unnamed Site' in log)
     
    135135        site = FakeSite()
    136136        site.__name__ = 'my_site'
    137         plugin = ApplicationsPlugin()
     137        plugin = ApplicantsPlugin()
    138138        plugin.update(site, 'blah', self.logger)
    139139        log = self.get_log()
     
    144144    suite = unittest.TestSuite()
    145145    for testcase in [
    146             ApplicationsRootTestCase,
    147             ApplicationsRootPluginTestCase,
     146            ApplicantsRootTestCase,
     147            ApplicantsRootPluginTestCase,
    148148            ]:
    149149        suite.addTests(unittest.TestLoader().loadTestsFromTestCase(testcase))
Note: See TracChangeset for help on using the changeset viewer.