Changeset 12213 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests
- Timestamp:
- 13 Dec 2014, 10:51:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_document.py
r12204 r12213 30 30 from waeup.ikoba.imagestorage import DefaultStorage 31 31 from waeup.ikoba.documents.interfaces import ( 32 IDocumentsContainer, I Document, IPDFDocument, IHTMLDocument)32 IDocumentsContainer, IPublicDocument, IPDFDocument, IHTMLDocument) 33 33 from waeup.ikoba.documents.container import DocumentsContainer 34 34 from waeup.ikoba.documents.document import ( 35 Document,PDFDocument, HTMLDocument,35 PDFDocument, HTMLDocument, 36 36 DocumentFileNameChooser, DocumentFileStoreHandler) 37 37 from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase) … … 53 53 self.assertTrue( 54 54 verifyClass( 55 IDocument, Document)56 )57 self.assertTrue(58 verifyObject(59 IDocument, Document())60 )61 62 self.assertTrue(63 verifyClass(64 55 IPDFDocument, PDFDocument) 65 56 ) … … 68 59 IPDFDocument, PDFDocument()) 69 60 ) 70 71 61 self.assertTrue( 72 62 verifyClass( … … 93 83 IWorkflowInfo(document).fireTransition('create') 94 84 self.assertEqual(IWorkflowState(document).getState(), 'created') 95 IWorkflowInfo(document).fireTransition('submit')96 self.assertEqual(IWorkflowState(document).getState(), 'submitted')97 IWorkflowInfo(document).fireTransition('verify')98 self.assertEqual(IWorkflowState(document).getState(), 'verified')99 IWorkflowInfo(document).fireTransition('reset2')100 self.assertEqual(IWorkflowState(document).getState(), 'created')101 self.assertRaises(InvalidTransitionError,102 IWorkflowInfo(document).fireTransition, 'verify')103 IWorkflowInfo(document).fireTransition('submit')104 IWorkflowInfo(document).fireTransition('reset3')105 self.assertEqual(IWorkflowState(document).getState(), 'created')106 IWorkflowInfo(document).fireTransition('publish')107 self.assertEqual(IWorkflowState(document).getState(), 'published')108 85 return 109 86 … … 166 143 def test_name_chooser_available(self): 167 144 # we can get a name chooser for document objects as adapter 168 doc = Document()145 doc = PDFDocument() 169 146 chooser = IFileStoreNameChooser(doc) 170 147 self.assertTrue(chooser is not None) … … 173 150 def test_name_chooser_document(self): 174 151 # we can get an image filename for documents not in a container 175 doc = Document()152 doc = PDFDocument() 176 153 chooser = IFileStoreNameChooser(doc) 177 154 result = chooser.chooseName('sample.jpg')
Note: See TracChangeset for help on using the changeset viewer.