Commit fc44e8b683409fd872851f5d2a61d87c333e74ce
1 parent
69eb38ab
add test mode to plan data/ fix contract price for broker
Showing
2 changed files
with
5 additions
and
4 deletions
@@ -315,6 +315,7 @@ def test_tender_data_planning(params): | @@ -315,6 +315,7 @@ def test_tender_data_planning(params): | ||
315 | "startDate": get_now().replace(hour=0, minute=0, second=0, microsecond=0).isoformat() | 315 | "startDate": get_now().replace(hour=0, minute=0, second=0, microsecond=0).isoformat() |
316 | } | 316 | } |
317 | }, | 317 | }, |
318 | + "mode": "test", | ||
318 | "items": [], | 319 | "items": [], |
319 | "buyers": [] | 320 | "buyers": [] |
320 | } | 321 | } |
@@ -1268,14 +1268,14 @@ Require Failure | @@ -1268,14 +1268,14 @@ Require Failure | ||
1268 | 1268 | ||
1269 | Розрахувати ціну для ${contract_number} контракту | 1269 | Розрахувати ціну для ${contract_number} контракту |
1270 | ${username}= Отримати користувача з доступом до поля за пріорітетом agreements ${tender_owner} ${viewer} | 1270 | ${username}= Отримати користувача з доступом до поля за пріорітетом agreements ${tender_owner} ${viewer} |
1271 | - ${contract_data}= Create Dictionary data=${USERS.users['${tender_owner}'].tender_data.data.agreements[0].contracts[${contract_number}]} | 1271 | + ${contract_data}= Create Dictionary data=${USERS.users['${username}'].tender_data.data.agreements[0].contracts[${contract_number}]} |
1272 | ${quantity}= Set Variable ${0} | 1272 | ${quantity}= Set Variable ${0} |
1273 | :FOR ${index} IN RANGE ${NUMBER_OF_ITEMS} | 1273 | :FOR ${index} IN RANGE ${NUMBER_OF_ITEMS} |
1274 | - \ ${quantity}= Evaluate ${quantity}+${USERS.users['${tender_owner}'].tender_data.data['items'][${index}]['quantity']} | ||
1275 | - ${value}= Evaluate ${USERS.users['${tender_owner}'].tender_data.data.awards[${contract_number}+1].value.amount}/${quantity} | 1274 | + \ ${quantity}= Evaluate ${quantity}+${USERS.users['${username}'].tender_data.data['items'][${index}]['quantity']} |
1275 | + ${value}= Evaluate ${USERS.users['${username}'].tender_data.data.awards[${contract_number}+1].value.amount}/${quantity} | ||
1276 | ${value}= Convert To Integer ${value} | 1276 | ${value}= Convert To Integer ${value} |
1277 | :FOR ${index} IN RANGE ${NUMBER_OF_ITEMS} | 1277 | :FOR ${index} IN RANGE ${NUMBER_OF_ITEMS} |
1278 | \ Set To Dictionary ${contract_data.data.unitPrices[${index}].value} amount=${value} | 1278 | \ Set To Dictionary ${contract_data.data.unitPrices[${index}].value} amount=${value} |
1279 | ${contract_data}= munch_dict arg=${contract_data} | 1279 | ${contract_data}= munch_dict arg=${contract_data} |
1280 | Log ${contract_data} | 1280 | Log ${contract_data} |
1281 | - [Return] ${contract_data} | 1281 | + [Return] ${contract_data} |
Please
register
or
login
to post a comment