Ignore:
Timestamp:
18 Dec 2014, 12:58:12 (10 years ago)
Author:
Henrik Bettermann
Message:

Change document_id generation algorithm. Use Universally Unique IDentifiers instead of consecutive numbers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py

    r12221 r12256  
    156156        # we can export a nearly empty document
    157157        document = CustomerSampleDocument()
     158        document.document_id = u'DOC1'
    158159        exporter = CustomerDocumentExporter()
    159160        exporter.export([document], self.outfile)
     
    162163            result,
    163164            'class_name,document_id,history,state,title,user_id\r\n'
    164             'CustomerSampleDocument,d101,[],,,\r\n'
     165            'CustomerSampleDocument,DOC1,[],,,\r\n'
    165166            )
    166167        return
     
    170171        # set values we can expect in export file
    171172        self.setup_customer(self.customer)
    172         document = self.customer['documents']['d101']
     173        document = self.customer['documents']['DOC1']
    173174        exporter = CustomerDocumentExporter()
    174175        exporter.export([document], self.outfile)
     
    179180            )
    180181        self.assertMatches(
    181             '...CustomerSampleDocument,d101,[u\'2014-11-25 06:57:24 UTC - '
     182            '...CustomerSampleDocument,DOC1,[u\'2014-11-25 06:57:24 UTC - '
    182183            'Document created by system\'],'
    183184            'verified,My Document,A111111...',
     
    197198            in result)
    198199        self.assertMatches(
    199             '...CustomerSampleDocument,d101,[u\'2014-11-25 06:57:24 UTC - '
     200            '...CustomerSampleDocument,DOC1,[u\'2014-11-25 06:57:24 UTC - '
    200201            'Document created by system\'],'
    201202            'verified,My Document,A111111...',
     
    215216            in result)
    216217        self.assertMatches(
    217             '...CustomerSampleDocument,d101,[u\'2014-11-25 06:57:24 UTC - '
     218            '...CustomerSampleDocument,DOC1,[u\'2014-11-25 06:57:24 UTC - '
    218219            'Document created by system\'],'
    219220            'verified,My Document,A111111...',
     
    273274            'product_object,state,title\r\n'
    274275
    275             'SampleContract,sample,c101,d101,[u\'2014-12-04 12:10:46 UTC - '
     276            'SampleContract,sample,c101,DOC1,[u\'2014-12-04 12:10:46 UTC - '
    276277            'Contract created by system\'],,'
    277278            'SAM,created,My Contract\r\n',
     
    292293            'product_object,state,title\r\n'
    293294
    294             'SampleContract,sample,c101,d101,[u\'2014-12-04 12:10:46 UTC - '
     295            'SampleContract,sample,c101,DOC1,[u\'2014-12-04 12:10:46 UTC - '
    295296            'Contract created by system\'],,'
    296297            'SAM,created,My Contract\r\n',
     
    311312            'product_object,state,title\r\n'
    312313
    313             'SampleContract,sample,c101,d101,[u\'2014-12-04 12:10:46 UTC - '
     314            'SampleContract,sample,c101,DOC1,[u\'2014-12-04 12:10:46 UTC - '
    314315            'Contract created by system\'],,'
    315316            'SAM,created,My Contract\r\n',
Note: See TracChangeset for help on using the changeset viewer.