Ignore:
Timestamp:
3 Feb 2010, 08:16:32 (15 years ago)
Author:
uli
Message:

Check editing and reprocessing of data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt

    r4933 r4981  
    487487
    488488
     489Fixing the pending file
     490-----------------------
     491
     492We 'edit' the pending file (setting code to ``FAC5`` and title
     493appropriately, and removing the --ERROR-- column) and finish the
     494import this way:
     495
     496    >>> open(dc_path + '/newfaculties_zope.mgr.pending.csv', 'wb').write(
     497    ... """title_prefix,--IGNORE--,code,title
     498    ... faculty,static,FAC5,Faculty 5
     499    ... """)
     500
     501Step 1: start batch processing:
     502
     503    >>> browser.open('http://localhost/app/datacenter')
     504    >>> browser.getLink('Batch processing').click()
     505    >>> button = lookup_submit_value(
     506    ...   'select', 'newfaculties_zope.mgr.pending.csv', browser)
     507    >>> button.click()
     508
     509Step 2: select a processor and mode:
     510
     511    >>> importerselect = browser.getControl(name='importer')
     512    >>> importerselect.getControl('Faculty importer').selected = True
     513    >>> modeselect = browser.getControl(name='mode')
     514    >>> modeselect.getControl(value='create').selected = True
     515    >>> browser.getControl('Proceed to step 3...').click()
     516
     517Step 3/4: Fix headerlines and import:
     518
     519As there should be no problem with the headers, we can immediately
     520perfom the import:
     521
     522    >>> browser.getControl('Perform import...').click()
     523
     524This time everything should work:
     525
     526    >>> print browser.contents
     527    <!DOCTYPE html PUBLIC...
     528    ...
     529    ...Successfully processed 1 rows...
     530    ...
     531
     532    >>> sorted(os.listdir(dc_path))
     533    ['finished', 'logs', 'unfinished']
     534
     535    >>> os.listdir(dc_path + '/unfinished')
     536    []
     537
     538    >>> sorted(os.listdir(dc_path + '/finished'))
     539    ['certificates_zope.mgr.csv', ..., 'newfaculties_zope.mgr.csv',
     540     'newfaculties_zope.mgr.finished.csv']
     541
     542
    489543Clean up:
    490544
Note: See TracChangeset for help on using the changeset viewer.