Ignore:
Timestamp:
1 Apr 2010, 11:22:27 (15 years ago)
Author:
uli
Message:

Make sure we start with a fresh datacenter path, when testing
accesscodes. This brings us back to 100% test coverage for
accesscodes module.

File:
1 edited

Legend:

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

    r5108 r5115  
    2121    >>> u = University()
    2222    >>> root['myuniversity'] = u
     23
     24We set a new datacenter storage path:
     25
     26  >>> import os
     27  >>> browser.open('http://localhost/myuniversity')
     28  >>> browser.getLink('Data Center').click()
     29  >>> browser.getLink('Edit settings').click()
     30  >>> pathsetting = browser.getControl(name='newpath')
     31
     32  >>> cwd = os.getcwd()
     33  >>> uploadpath = os.path.join(cwd, 'ac_testfiles')
     34  >>> os.mkdir(uploadpath)
     35  >>> pathsetting.value = uploadpath
     36  >>> browser.getControl(name='save').click()
     37
     38We remove any existing 'accesscodes' dir from datacenter dir:
     39
     40  >>> import shutil
     41  >>> if os.path.exists(os.path.join(uploadpath, 'accesscodes')):
     42  ...   shutil.rmtree(os.path.join(uploadpath, 'accesscodes'))
     43
    2344
    2445Access-code management screen
     
    108129    >>> browser.getControl(name='form.cost').value = '10.12'
    109130    >>> browser.getControl('Create batch').click()
     131
     132Clean up:
     133
     134    >>> shutil.rmtree(uploadpath)
Note: See TracChangeset for help on using the changeset viewer.