Ignore:
Timestamp:
21 Dec 2014, 22:32:59 (10 years ago)
Author:
Henrik Bettermann
Message:

Update test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/documents/tests/test_browser.py

    r12269 r12290  
    5252        exporter.export_all(self.app, self.outfile)
    5353        result = open(self.outfile, 'rb').read()
    54         self.assertEqual(result,
    55             'description,document_id,title,users_with_local_roles\r\n'
    56             ',DOC1,My first document,[]\r\n')
     54        self.assertMatches(result,
     55            'class_name,description,document_id,history,state,title,'
     56            'users_with_local_roles\r\n'
     57            'SkeletonDocument,,DOC1,'
     58            '[u\'2014-12-21 23:27:15 WAT - Document created by system\'],'
     59            'created,My first document,[]\r\n')
    5760        # We can import the same file.
    5861        processor = SkeletonDocumentProcessor()
    5962        result = processor.doImport(
    6063            self.outfile,
    61             ['description','document_id','title','users_with_local_roles'],
     64            ['class_name','description','document_id','history','state',
     65             'title','users_with_local_roles'],
    6266            mode='create')
    6367        num, num_fail, finished_path, failed_path = result
     
    6973        result = processor.doImport(
    7074            self.outfile,
    71             ['description','document_id','title','users_with_local_roles'],
    72             mode='create')
    73         num_succ, num_fail, finished_path, failed_path = result
    74         self.assertEqual(num_fail,1)
    75         # ... only if we add column
    76         open(self.outfile, 'wb').write(
    77             'description,document_id,title,users_with_local_roles,class_name\r\n'
    78             ',DOC1,My first title,[],SkeletonDocument\r\n')
    79         result = processor.doImport(
    80             self.outfile,
    81             ['description','document_id','title','users_with_local_roles','class_name'],
     75            ['class_name','description','document_id','history','state',
     76             'title','users_with_local_roles'],
    8277            mode='create')
    8378        num_succ, num_fail, finished_path, failed_path = result
     
    8782        result = processor.doImport(
    8883            self.outfile,
    89             ['description','document_id','title','users_with_local_roles'],
     84            ['class_name','description','document_id','history','state',
     85             'title','users_with_local_roles'],
    9086            mode='update')
    9187        num_succ, num_fail, finished_path, failed_path = result
Note: See TracChangeset for help on using the changeset viewer.