Changeset 9260
- Timestamp:
- 30 Sep 2012, 20:28:32 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/accesscodes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.py
r8389 r9260 257 257 ) 258 258 writer = csv.writer(open(csv_path, 'w'), quoting=csv.QUOTE_ALL) 259 writer.writerow(['prefix', 'serial', 'ac', 'state', 'history', 'cost']) 259 writer.writerow(['prefix', 'serial', 'ac', 'state', 'history', 260 'cost','owner']) 260 261 writer.writerow([self.prefix, '%0.2f' % self.cost, str(self.num), 261 262 str(self.entry_num)]) … … 266 267 writer.writerow([ 267 268 self.prefix, value.batch_serial, value.representation, 268 value.state, value.history, value.cost 269 value.state, value.history, value.cost, value.owner 269 270 ]) 270 271 return os.path.basename(csv_path) -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.txt
r8321 r9260 438 438 ... sorted(os.listdir(ac_storage))[-2]) 439 439 >>> print open(archive_file, 'rb').read() 440 "prefix","serial","ac","state","history","cost" 440 "prefix","serial","ac","state","history","cost","owner" 441 441 "BLA","19.12","1","3" 442 "BLA","0","BLA-1-<10-DIGITS>","initialized","...","19.12" 443 "BLA","1","BLA-1-<10-DIGITS>","initialized","...","19.12" 444 "BLA","2","BLA-1-<10-DIGITS>","initialized","...","19.12" 442 "BLA","0","BLA-1-<10-DIGITS>","initialized","...","19.12","" 443 "BLA","1","BLA-1-<10-DIGITS>","initialized","...","19.12","" 444 "BLA","2","BLA-1-<10-DIGITS>","initialized","...","19.12","" 445 445 446 446 Clean up: -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/tests/test_accesscode.py
r8321 r9260 301 301 result_path = os.path.join(batch._getStoragePath(), basename) 302 302 expected = ''' 303 "prefix","serial","ac","state","history","cost" 303 "prefix","serial","ac","state","history","cost","owner" 304 304 "FOO","9.99","1","0" 305 "FOO","0","FOO-1-11111111","used","<YYYY-MM-DD hh:mm:ss> UTC - ...","2345.0" 305 "FOO","0","FOO-1-11111111","used","<YYYY-MM-DD hh:mm:ss> UTC - ...","2345.0","" 306 306 "FOO","1","FOO-1-22222222","initialized","<YYYY-MM-DD hh:mm:ss> UTC - ...","" 307 307 "FOO","2","FOO-1-33333333","disabled","<YYYY-MM-DD hh:mm:ss> UTC - ...",""
Note: See TracChangeset for help on using the changeset viewer.