Changeset 5128 for main/waeup.sirp/trunk


Ignore:
Timestamp:
5 Apr 2010, 13:44:59 (15 years ago)
Author:
uli
Message:

Update tests.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes
Files:
2 edited

Legend:

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

    r5122 r5128  
    103103   representations:
    104104
    105     >>> ac = AccessCode(None, '9999999999', 12.12)
     105    >>> ac = AccessCode(None, '9999999999')
    106106    >>> ac.representation
    107107    '--<10-DIGITS>'
     108
     109   Also the ``cost`` will not be set:
     110
     111    >>> ac.cost is None
     112    True
    108113
    109114
     
    302307   .. method:: addBatch(batch)
    303308
    304       Add a batch in this container.
     309      Add a batch in this container. You should make sure, that
     310      entries in the given batch are set correctly.
     311
     312   .. method:: createBatch(creation_date, creator, batch_prefix, cost, entry_num)
     313
     314      Create a batch inside this container. Returns the batch created.
     315
     316      :param creation_date: python datetime
     317      :param creator: creators user id
     318      :type creator: string
     319      :param batch_prefix: prefix of this batch
     320      :param cost: cost per access code
     321      :type cost: float
     322      :param entry_num: number of access codes to create
    305323
    306324   .. method:: getNum(prefix)
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.txt

    r5125 r5128  
    139139    >>> browser.getControl(name='form.cost').value = '19.12'
    140140    >>> browser.getControl('Create batch').click()
     141
     142We also invalidate one entry:
     143
     144    >>> batch = getRootFolder()['myuniversity']['accesscodes']['BLA-1']
     145    >>> ac = list(batch.entries())[0]
     146    >>> batch.invalidate(ac.representation)
    141147
    142148Creating Archive Files
     
    230236    "prefix","serial","ac","student","date"
    231237    "BLA","19.12","1","3"
    232     "BLA","0","BLA-1-<10-DIGITS>","",""
     238    "BLA","0","BLA-1-<10-DIGITS>","","..."
    233239    "BLA","1","BLA-1-<10-DIGITS>","",""
    234240    "BLA","2","BLA-1-<10-DIGITS>","",""
Note: See TracChangeset for help on using the changeset viewer.