Commit e2d49802bd320c1af413971d72e52bf4c4ba3022

Authored by kosaniak
1 parent 527dee36

Add new variable for accelerator

@@ -58,7 +58,8 @@ def create_fake_doc(): @@ -58,7 +58,8 @@ def create_fake_doc():
58 58
59 def test_tender_data(params, 59 def test_tender_data(params,
60 periods=("enquiry", "tender"), 60 periods=("enquiry", "tender"),
61 - submissionMethodDetails=None): 61 + submissionMethodDetails=None,
  62 + accelerator=None):
62 submissionMethodDetails = submissionMethodDetails \ 63 submissionMethodDetails = submissionMethodDetails \
63 if submissionMethodDetails else "quick" 64 if submissionMethodDetails else "quick"
64 now = get_now() 65 now = get_now()
@@ -85,7 +86,8 @@ def test_tender_data(params, @@ -85,7 +86,8 @@ def test_tender_data(params,
85 "items": [], 86 "items": [],
86 "features": [] 87 "features": []
87 } 88 }
88 - accelerator = params['intervals']['accelerator'] 89 + accelerator = accelerator \
  90 + if accelerator else params['intervals']['accelerator']
89 data['procurementMethodDetails'] = 'quick, ' \ 91 data['procurementMethodDetails'] = 'quick, ' \
90 'accelerator={}'.format(accelerator) 92 'accelerator={}'.format(accelerator)
91 data["procuringEntity"]["kind"] = "other" 93 data["procuringEntity"]["kind"] = "other"
@@ -205,7 +205,8 @@ Get Broker Property By Username @@ -205,7 +205,8 @@ Get Broker Property By Username
205 [Arguments] ${tender_parameters} 205 [Arguments] ${tender_parameters}
206 ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers} 206 ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers}
207 ${submissionMethodDetails}= Get Variable Value ${submissionMethodDetails} 207 ${submissionMethodDetails}= Get Variable Value ${submissionMethodDetails}
208 - ${tender_data}= prepare_test_tender_data ${period_intervals} ${tender_parameters} ${submissionMethodDetails} 208 + ${accelerator}= Get Variable Value ${accelerator}
  209 + ${tender_data}= prepare_test_tender_data ${period_intervals} ${tender_parameters} ${submissionMethodDetails} ${accelerator}
209 ${TENDER}= Create Dictionary 210 ${TENDER}= Create Dictionary
210 Set Global Variable ${TENDER} 211 Set Global Variable ${TENDER}
211 Log ${tender_data} 212 Log ${tender_data}
@@ -816,7 +817,7 @@ Require Failure @@ -816,7 +817,7 @@ Require Failure
816 Оновити LAST_MODIFICATION_DATE 817 Оновити LAST_MODIFICATION_DATE
817 Дочекатись синхронізації з майданчиком ${username} 818 Дочекатись синхронізації з майданчиком ${username}
818 Wait until keyword succeeds 819 Wait until keyword succeeds
819 - ... 10 min 15 sec 820 + ... 40 min 15 sec
820 ... 15 sec 821 ... 15 sec
821 ... Звірити статус тендера 822 ... Звірити статус тендера
822 ... ${username} 823 ... ${username}
@@ -282,7 +282,8 @@ def compute_intrs(brokers_data, used_brokers): @@ -282,7 +282,8 @@ def compute_intrs(brokers_data, used_brokers):
282 282
283 def prepare_test_tender_data(procedure_intervals, 283 def prepare_test_tender_data(procedure_intervals,
284 tender_parameters, 284 tender_parameters,
285 - submissionMethodDetails): 285 + submissionMethodDetails,
  286 + accelerator):
286 # Get actual intervals by mode name 287 # Get actual intervals by mode name
287 mode = tender_parameters['mode'] 288 mode = tender_parameters['mode']
288 if mode in procedure_intervals: 289 if mode in procedure_intervals:
@@ -316,7 +317,8 @@ def prepare_test_tender_data(procedure_intervals, @@ -316,7 +317,8 @@ def prepare_test_tender_data(procedure_intervals,
316 elif mode == 'belowThreshold': 317 elif mode == 'belowThreshold':
317 return munchify({'data': test_tender_data( 318 return munchify({'data': test_tender_data(
318 tender_parameters, 319 tender_parameters,
319 - submissionMethodDetails=submissionMethodDetails)}) 320 + submissionMethodDetails=submissionMethodDetails,
  321 + accelerator=accelerator)})
320 # The previous line needs an explicit keyword argument because, 322 # The previous line needs an explicit keyword argument because,
321 # unlike previous functions, this one has three arguments. 323 # unlike previous functions, this one has three arguments.
322 raise ValueError("Invalid mode for prepare_test_tender_data") 324 raise ValueError("Invalid mode for prepare_test_tender_data")
Please register or login to post a comment