Ignore:
Timestamp:
13 Dec 2014, 10:51:17 (10 years ago)
Author:
Henrik Bettermann
Message:

We need different workflows for customer documents and central 'public' documents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_document.py

    r12204 r12213  
    3030from waeup.ikoba.imagestorage import DefaultStorage
    3131from waeup.ikoba.documents.interfaces import (
    32     IDocumentsContainer, IDocument, IPDFDocument, IHTMLDocument)
     32    IDocumentsContainer, IPublicDocument, IPDFDocument, IHTMLDocument)
    3333from waeup.ikoba.documents.container import DocumentsContainer
    3434from waeup.ikoba.documents.document import (
    35     Document, PDFDocument, HTMLDocument,
     35    PDFDocument, HTMLDocument,
    3636    DocumentFileNameChooser, DocumentFileStoreHandler)
    3737from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
     
    5353        self.assertTrue(
    5454            verifyClass(
    55                 IDocument, Document)
    56             )
    57         self.assertTrue(
    58             verifyObject(
    59                 IDocument, Document())
    60             )
    61 
    62         self.assertTrue(
    63             verifyClass(
    6455                IPDFDocument, PDFDocument)
    6556            )
     
    6859                IPDFDocument, PDFDocument())
    6960            )
    70 
    7161        self.assertTrue(
    7262            verifyClass(
     
    9383        IWorkflowInfo(document).fireTransition('create')
    9484        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')
    10885        return
    10986
     
    166143    def test_name_chooser_available(self):
    167144        # we can get a name chooser for document objects as adapter
    168         doc = Document()
     145        doc = PDFDocument()
    169146        chooser = IFileStoreNameChooser(doc)
    170147        self.assertTrue(chooser is not None)
     
    173150    def test_name_chooser_document(self):
    174151        # we can get an image filename for documents not in a container
    175         doc = Document()
     152        doc = PDFDocument()
    176153        chooser = IFileStoreNameChooser(doc)
    177154        result = chooser.chooseName('sample.jpg')
Note: See TracChangeset for help on using the changeset viewer.