Commit 609366b087fcb660fa6e57d13a4e503a16b1e471

Authored by smithumble
1 parent 4f9f4653

Fix tendering contract amountNet tests for vat not included

... ... @@ -157,7 +157,7 @@ Suite Teardown Test Suite Teardown
157 157 [Setup] Дочекатись синхронізації з майданчиком ${tender_owner}
158 158 ${award}= Отримати останній элемент awards ${tender_owner} ${viewer}
159 159 ${contract_index}= Отримати останній індекс contracts ${tender_owner} ${viewer}
160   - ${amount_net}= Evaluate ${award.value.amount} + 1
  160 + ${amount_net}= Evaluate ${award.value.amount} * 2
161 161 ${value}= Require Failure ${tender_owner} Редагувати угоду
162 162 ... ${TENDER['TENDER_UAID']}
163 163 ... ${contract_index}
... ...
... ... @@ -169,7 +169,8 @@ def test_tender_data(params,
169 169 },
170 170 "minimalStep": {
171 171 "amount": round(random.uniform(0.005, 0.03) * value_amount, 2),
172   - "currency": u"UAH"
  172 + "currency": u"UAH",
  173 + "valueAddedTaxIncluded": vat_included
173 174 },
174 175 "items": [],
175 176 "features": []
... ... @@ -478,12 +479,12 @@ def test_bid_data():
478 479 return bid
479 480
480 481
481   -def test_bid_value(max_value_amount):
  482 +def test_bid_value(max_value_amount, vat_included):
482 483 return munchify({
483 484 "value": {
484 485 "currency": "UAH",
485 486 "amount": round(random.uniform((0.95 * max_value_amount), max_value_amount), 2),
486   - "valueAddedTaxIncluded": True
  487 + "valueAddedTaxIncluded": vat_included
487 488 }
488 489 })
489 490
... ...
... ... @@ -627,7 +627,7 @@ def generate_test_bid_data(tender_data):
627 627 if tender_data.get('procurementMethodType', '') == 'esco':
628 628 value = test_bid_value_esco(tender_data)
629 629 else:
630   - value = test_bid_value(lot['value']['amount'])
  630 + value = test_bid_value(lot['value']['amount'], lot['value']['valueAddedTaxIncluded'])
631 631 value['relatedLot'] = lot.get('id', '')
632 632 bid.data.lotValues.append(value)
633 633 else:
... ... @@ -635,7 +635,7 @@ def generate_test_bid_data(tender_data):
635 635 value = test_bid_value(tender_data)
636 636 bid.data.update(value)
637 637 else:
638   - bid.data.update(test_bid_value(tender_data['value']['amount']))
  638 + bid.data.update(test_bid_value(tender_data['value']['amount'], tender_data['value']['valueAddedTaxIncluded']))
639 639 if 'features' in tender_data:
640 640 bid.data.parameters = []
641 641 for feature in tender_data['features']:
... ...
... ... @@ -25,4 +25,7 @@
25 25
26 26 -i qualification_approve_first_award
27 27
  28 +-i contract_view
  29 +-i modify_contract
  30 +-i add_doc_to_contract
28 31 -i contract_sign
\ No newline at end of file
... ...
Please register or login to post a comment