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