Changeset 14197 for main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_document.py
- Timestamp:
- 28 Sep 2016, 07:04:12 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_document.py
r14181 r14197 29 29 30 30 from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase) 31 from ikobacustom.uniben.customers.documents import UnibenCustomerDocument 32 from ikobacustom.uniben.customers.interfaces import IUnibenCustomerDocument 31 from ikobacustom.uniben.customers.documents import ( 32 UnibenCustomerPDFDocument, UnibenCustomerJPGDocument) 33 from ikobacustom.uniben.customers.interfaces import ( 34 IUnibenCustomerPDFDocument, IUnibenCustomerJPGDocument) 33 35 34 36 … … 38 40 39 41 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()) 44 50 return 45 51 46 52 def test_addDocument(self): 47 53 container = CustomerDocumentsContainer() 48 document = createObject(u'waeup.UnibenCustomer Document')54 document = createObject(u'waeup.UnibenCustomerPDFDocument') 49 55 id = document.document_id 50 56 container.addDocument(document) 51 57 self.assertEqual(container[id], document) 52 58 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') 54 66 return
Note: See TracChangeset for help on using the changeset viewer.