Commit f39743c469434bb945a6d7c740e6c91655b2d11d
Committed by
GitHub
Merge pull request #118 from ProzorroUKR/VAT
fix_vat_false_true
Showing
5 changed files
with
15 additions
and
8 deletions
@@ -461,11 +461,9 @@ Suite Teardown Test Suite Teardown | @@ -461,11 +461,9 @@ Suite Teardown Test Suite Teardown | ||
461 | ... ${USERS.users['${tender_owner}'].broker} | 461 | ... ${USERS.users['${tender_owner}'].broker} |
462 | ... change_amount_paid | 462 | ... change_amount_paid |
463 | [Teardown] Оновити LAST_MODIFICATION_DATE | 463 | [Teardown] Оновити LAST_MODIFICATION_DATE |
464 | - ${award}= Отримати останній элемент awards ${tender_owner} ${viewer} | ||
465 | - ${amountPaid.amount}= create_fake_amount | 464 | + ${amountPaid.amount}= create_fake_amount_paid |
466 | ... ${USERS.users['${tender_owner}'].contract_data.data.value.amount} | 465 | ... ${USERS.users['${tender_owner}'].contract_data.data.value.amount} |
467 | - ... ${award.value.valueAddedTaxIncluded} | ||
468 | - ... ${USERS.users['${tender_owner}'].contract_data.data.value.valueAddedTaxIncluded} | 466 | + ... ${USERS.users['${tender_owner}'].contract_data.data.value.amountNet} |
469 | Set to dictionary ${USERS.users['${tender_owner}']} new_amountPaid_amount=${amountPaid.amount} | 467 | Set to dictionary ${USERS.users['${tender_owner}']} new_amountPaid_amount=${amountPaid.amount} |
470 | Run As ${tender_owner} Редагувати поле договору ${CONTRACT_UAID} amountPaid.amount ${amountPaid.amount} | 468 | Run As ${tender_owner} Редагувати поле договору ${CONTRACT_UAID} amountPaid.amount ${amountPaid.amount} |
471 | 469 |
@@ -226,7 +226,7 @@ Suite Teardown Test Suite Teardown | @@ -226,7 +226,7 @@ Suite Teardown Test Suite Teardown | ||
226 | ... value.amountNet | 226 | ... value.amountNet |
227 | ... ${amount_net} | 227 | ... ${amount_net} |
228 | Run Keyword IF '${award.value.valueAddedTaxIncluded}' == '${False}' and '${contract.value.valueAddedTaxIncluded}' == '${True}' | 228 | Run Keyword IF '${award.value.valueAddedTaxIncluded}' == '${False}' and '${contract.value.valueAddedTaxIncluded}' == '${True}' |
229 | - ... Should Contain ${value} Amount and amountNet should be equal | 229 | + ... Should Contain ${value} AmountNet should be less or equal to awarded amount |
230 | Run Keyword IF '${award.value.valueAddedTaxIncluded}' == '${True}' and '${contract.value.valueAddedTaxIncluded}' == '${False}' | 230 | Run Keyword IF '${award.value.valueAddedTaxIncluded}' == '${True}' and '${contract.value.valueAddedTaxIncluded}' == '${False}' |
231 | ... Should Contain ${value} Amount and amountNet should be equal | 231 | ... Should Contain ${value} Amount and amountNet should be equal |
232 | Run Keyword IF '${award.value.valueAddedTaxIncluded}' == '${False}' and '${contract.value.valueAddedTaxIncluded}' == '${False}' | 232 | Run Keyword IF '${award.value.valueAddedTaxIncluded}' == '${False}' and '${contract.value.valueAddedTaxIncluded}' == '${False}' |
@@ -302,7 +302,7 @@ Suite Teardown Test Suite Teardown | @@ -302,7 +302,7 @@ Suite Teardown Test Suite Teardown | ||
302 | ... ${contract_index} | 302 | ... ${contract_index} |
303 | ... value.amount | 303 | ... value.amount |
304 | ... ${amount} | 304 | ... ${amount} |
305 | - Should Contain ${value} Value amount can't be greater than amountNet | 305 | + Should Contain ${value} Amount should be greater than amountNet and differ by no more than 20.0%" |
306 | 306 | ||
307 | 307 | ||
308 | Можливість встановити дату підписання угоди | 308 | Можливість встановити дату підписання угоди |
@@ -73,6 +73,14 @@ def create_fake_amount_net(award_amount, tender_value_added_tax_included, contra | @@ -73,6 +73,14 @@ def create_fake_amount_net(award_amount, tender_value_added_tax_included, contra | ||
73 | return round(random.uniform(half_min_amount_net, award_amount), 2) | 73 | return round(random.uniform(half_min_amount_net, award_amount), 2) |
74 | 74 | ||
75 | 75 | ||
76 | +def create_fake_amount_paid(contract_amount, contract_amountNet): | ||
77 | + minimum = contract_amountNet | ||
78 | + maximum = contract_amount | ||
79 | + range = maximum - minimum | ||
80 | + half_min_range = minimum + range / 2 | ||
81 | + return round(random.uniform(minimum, half_min_range), 2) | ||
82 | + | ||
83 | + | ||
76 | def create_fake_number(min_number, max_number): | 84 | def create_fake_number(min_number, max_number): |
77 | return random.randint(int(min_number), int(max_number)) | 85 | return random.randint(int(min_number), int(max_number)) |
78 | 86 |
@@ -21,6 +21,7 @@ from .initial_data import ( | @@ -21,6 +21,7 @@ from .initial_data import ( | ||
21 | create_fake_sentence, | 21 | create_fake_sentence, |
22 | create_fake_amount, | 22 | create_fake_amount, |
23 | create_fake_amount_net, | 23 | create_fake_amount_net, |
24 | + create_fake_amount_paid, | ||
24 | create_fake_number, | 25 | create_fake_number, |
25 | create_fake_number_float, | 26 | create_fake_number_float, |
26 | create_fake_date, | 27 | create_fake_date, |
@@ -27,8 +27,8 @@ | @@ -27,8 +27,8 @@ | ||
27 | -i modify_contract_amount_net | 27 | -i modify_contract_amount_net |
28 | -i modify_contract_value | 28 | -i modify_contract_value |
29 | 29 | ||
30 | --i modify_contract_invalid_amount | ||
31 | --i modify_contract_invalid_amountNet_tender_vat_true | 30 | +-i modify_contract_invalid_amountNet |
31 | +-i modify_contract_invalid_amount_tender_vat_false | ||
32 | 32 | ||
33 | -i modify_contract | 33 | -i modify_contract |
34 | 34 |
Please
register
or
login
to post a comment