Commit 077f53f60a33d5d6c71e34526f1adb7fdb563185

Authored by Andrew Yanovych
1 parent 0b0deedd

added single/multi item auction switcher

... ... @@ -25,11 +25,11 @@ TIMEZONE = timezone('Europe/Kiev')
25 25
26 26 def change_state(arguments):
27 27 try:
28   - if arguments[0] == "shouldfail":
29   - return "shouldfail"
30   - return "pass"
  28 + if arguments[0] == "shouldfail":
  29 + return "shouldfail"
  30 + return "pass"
31 31 except IndexError:
32   - return "pass"
  32 + return "pass"
33 33
34 34 def prepare_prom_test_tender_data():
35 35 return munchify({'data': prom_test_tender_data()})
... ... @@ -76,11 +76,12 @@ def load_initial_data_from(file_name):
76 76 return fromYAML(file_obj)
77 77
78 78
79   -def prepare_test_tender_data(period_interval=2):
80   - return munchify({'data': test_tender_data(period_interval=period_interval)})
81   -
82   -def prepare_test_tender_data_multiple_items():
83   - return munchify({'data': test_tender_data_multiple_lots()})
  79 +def prepare_test_tender_data(period_interval=2, mode='single'):
  80 + if mode == 'single':
  81 + return munchify({'data': test_tender_data(period_interval=period_interval)})
  82 + elif mode == 'multi':
  83 + return munchify({'data': test_tender_data_multiple_lots(period_interval=period_interval)})
  84 + raise ValueError('A very specific bad thing happened')
84 85
85 86
86 87 def run_keyword_and_ignore_keyword_definations(name, *args):
... ...
Please register or login to post a comment