Ignore:
Timestamp:
28 Sep 2016, 07:04:12 (8 years ago)
Author:
Henrik Bettermann
Message:

Add components for customer JPG documents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_document.py

    r14181 r14197  
    2929
    3030from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
    31 from ikobacustom.uniben.customers.documents import UnibenCustomerDocument
    32 from ikobacustom.uniben.customers.interfaces import IUnibenCustomerDocument
     31from ikobacustom.uniben.customers.documents import (
     32    UnibenCustomerPDFDocument, UnibenCustomerJPGDocument)
     33from ikobacustom.uniben.customers.interfaces import (
     34    IUnibenCustomerPDFDocument, IUnibenCustomerJPGDocument)
    3335
    3436
     
    3840
    3941    def test_interfaces(self):
    40         verify.verifyClass(IUnibenCustomerDocument, UnibenCustomerDocument)
    41         verify.verifyClass(ICustomerNavigation, UnibenCustomerDocument)
    42         verify.verifyObject(IUnibenCustomerDocument, UnibenCustomerDocument())
    43         verify.verifyObject(ICustomerNavigation, UnibenCustomerDocument())
     42        verify.verifyClass(IUnibenCustomerPDFDocument, UnibenCustomerPDFDocument)
     43        verify.verifyClass(ICustomerNavigation, UnibenCustomerPDFDocument)
     44        verify.verifyObject(IUnibenCustomerPDFDocument, UnibenCustomerPDFDocument())
     45        verify.verifyObject(ICustomerNavigation, UnibenCustomerPDFDocument())
     46        verify.verifyClass(IUnibenCustomerJPGDocument, UnibenCustomerJPGDocument)
     47        verify.verifyClass(ICustomerNavigation, UnibenCustomerJPGDocument)
     48        verify.verifyObject(IUnibenCustomerJPGDocument, UnibenCustomerJPGDocument())
     49        verify.verifyObject(ICustomerNavigation, UnibenCustomerJPGDocument())
    4450        return
    4551
    4652    def test_addDocument(self):
    4753        container = CustomerDocumentsContainer()
    48         document = createObject(u'waeup.UnibenCustomerDocument')
     54        document = createObject(u'waeup.UnibenCustomerPDFDocument')
    4955        id = document.document_id
    5056        container.addDocument(document)
    5157        self.assertEqual(container[id], document)
    5258        self.assertRaises(TypeError, container.addDocument, object())
    53         self.assertEqual(document.class_name, 'UnibenCustomerDocument')
     59        self.assertEqual(document.class_name, 'UnibenCustomerPDFDocument')
     60        document2 = createObject(u'waeup.UnibenCustomerJPGDocument')
     61        id = document2.document_id
     62        container.addDocument(document2)
     63        self.assertEqual(container[id], document2)
     64        self.assertRaises(TypeError, container.addDocument, object())
     65        self.assertEqual(document2.class_name, 'UnibenCustomerJPGDocument')
    5466        return
Note: See TracChangeset for help on using the changeset viewer.