Changeset 12785 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Timestamp:
- 18 Mar 2015, 08:45:41 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_interfaces.py
r12585 r12785 24 24 import shutil 25 25 from datetime import date 26 from zope.event import notify 26 27 from zope.component.hooks import setSite 27 28 from zope.component import queryUtility, createObject 28 29 from hurry.workflow.interfaces import IWorkflowState 29 30 from waeup.ikoba.app import Company 30 from waeup.ikoba.interfaces import SUBMITTED 31 from waeup.ikoba.interfaces import SUBMITTED, APPROVED 31 32 from waeup.ikoba.customers.vocabularies import ( 32 ConCatProductSource, ConCatActiveProductSource, CustomerDocumentSource) 33 ConCatProductSource, ConCatActiveProductSource, CustomerDocumentSource, 34 RefereeSourceFactory 35 ) 33 36 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase 34 37 … … 133 136 self.assertEqual(result, u'DOC1... - My Sample Document') 134 137 138 def test_getValues_RefereeSourceFactory(self): 139 source = RefereeSourceFactory() 140 result = source.factory.getValues(object()) 141 self.assertFalse(self.customer in result) 142 IWorkflowState(self.customer).setState(APPROVED) 143 notify(grok.ObjectModifiedEvent(self.customer)) 144 result = source.factory.getValues(object()) 145 self.assertTrue(self.customer in result) 146 147 def test_getTitle_RefereeSourceFactory(self): 148 source = RefereeSourceFactory() 149 result = source.factory.getTitle(object(), self.customer) 150 self.assertEqual(result, u'Bob Tester (K1000000)')
Note: See TracChangeset for help on using the changeset viewer.