Changeset 12186 for main/waeup.ikoba/trunk/src/waeup/ikoba/tests
- Timestamp:
- 9 Dec 2014, 16:45:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/tests/test_configuration.py
r11949 r12186 21 21 from zope.interface import verify 22 22 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase 23 from waeup.ikoba.configuration import ( 24 ConfigurationContainer, SessionConfiguration, SessionConfigurationFactory) 25 from waeup.ikoba.interfaces import( 26 IConfigurationContainer, ISessionConfiguration, ISessionConfigurationAdd) 23 from waeup.ikoba.configuration import ConfigurationContainer 24 from waeup.ikoba.interfaces import IConfigurationContainer 27 25 28 26 class ConfigurationTest(FunctionalTestCase): … … 33 31 super(ConfigurationTest, self).setUp() 34 32 self.confcontainer = ConfigurationContainer() 35 self.sessionconf = SessionConfiguration()36 33 return 37 34 … … 43 40 verify.verifyClass(IConfigurationContainer, ConfigurationContainer) 44 41 verify.verifyObject(IConfigurationContainer, self.confcontainer) 45 verify.verifyClass(ISessionConfiguration, SessionConfiguration)46 verify.verifyObject(ISessionConfiguration, self.sessionconf)47 verify.verifyClass(ISessionConfigurationAdd, SessionConfiguration)48 verify.verifyObject(ISessionConfigurationAdd, self.sessionconf)49 50 class SessionConfigurationFactoryTest(FunctionalTestCase):51 52 layer = FunctionalLayer53 54 def setUp(self):55 super(SessionConfigurationFactoryTest, self).setUp()56 self.factory = SessionConfigurationFactory()57 58 def tearDown(self):59 super(SessionConfigurationFactoryTest, self).tearDown()60 61 def test_interfaces(self):62 verify.verifyClass(IFactory, SessionConfigurationFactory)63 verify.verifyObject(IFactory, self.factory)64 65 def test_factory(self):66 obj = self.factory()67 assert isinstance(obj, SessionConfiguration)68 69 def test_getInterfaces(self):70 implemented_by = self.factory.getInterfaces()71 assert implemented_by.isOrExtends(ISessionConfiguration)
Note: See TracChangeset for help on using the changeset viewer.