Changeset 12287 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests
- Timestamp:
- 21 Dec 2014, 17:00:10 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_export.py
r12266 r12287 62 62 exporter.export([self.pdfdocument], self.outfile) 63 63 result = open(self.outfile, 'rb').read() 64 self.assertTrue( 65 'description,document_id,title,users_with_local_roles\r\n' 66 ',DOC1,,"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"' 67 in result 64 self.assertMatches( 65 'class_name,description,document_id,history,state,title,users_with_local_roles\r\n' 66 'PDFDocument,,DOC1,' 67 '[u\'2014-12-21 16:55:16 UTC - Document created by system\'],' 68 'created,,"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"', 69 result 68 70 ) 69 71 return … … 74 76 exporter.export_all(self.app, self.outfile) 75 77 result = open(self.outfile, 'rb').read() 76 self.assertTrue( 77 'description,document_id,title,users_with_local_roles\r\n' 78 ',DOC1,,"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"' 79 in result 78 self.assertMatches( 79 'class_name,description,document_id,history,state,title,users_with_local_roles\r\n' 80 'PDFDocument,,DOC1,' 81 '[u\'2014-12-21 16:55:16 UTC - Document created by system\'],' 82 'created,,"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"', 83 result 80 84 ) 81 85 return … … 109 113 exporter.export([self.htmldocument], self.outfile) 110 114 result = open(self.outfile, 'rb').read() 111 self.assertTrue( 112 'description,document_id,html_multilingual,title,' 113 'users_with_local_roles\r\n,DOC2,' 114 ',,' 115 '"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"\r\n' 116 in result 115 self.assertMatches( 116 'class_name,description,document_id,history,html_dict,' 117 'html_multilingual,state,title,users_with_local_roles\r\n' 118 'HTMLDocument,,DOC2,' 119 '[u\'2014-12-21 16:50:28 UTC - Document created by system\'],' 120 '{},,created,,"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"', 121 result 117 122 ) 118 123 return … … 123 128 exporter.export_all(self.app, self.outfile) 124 129 result = open(self.outfile, 'rb').read() 125 self.assertTrue( 126 'description,document_id,html_multilingual,title,' 127 'users_with_local_roles\r\n,DOC2,' 128 ',,' 129 '"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"\r\n' 130 in result 130 self.assertMatches( 131 'class_name,description,document_id,history,html_dict,' 132 'html_multilingual,state,title,users_with_local_roles\r\n' 133 'HTMLDocument,,DOC2,' 134 '[u\'2014-12-21 16:50:28 UTC - Document created by system\'],' 135 '{},,created,,"[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"', 136 result 131 137 ) 132 138 return
Note: See TracChangeset for help on using the changeset viewer.