Commit 2fdc2df83ab30b9cda878258f77251f30b475483

Authored by mykhaly
Committed by OrysiaDrabych
1 parent a318a130

Add contracting management section to op_client.robot

Namely `Отримати internal id по UAid для договору` and `Пошук договору
по ідентифікатору`
... ... @@ -1279,3 +1279,29 @@ Library openprocurement_client.utils
1279 1279 Log ${data}
1280 1280 ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data}
1281 1281 Log ${reply}
  1282 + [Return] ${reply}
  1283 +
  1284 +##############################################################################
  1285 +# CONTRACT MANAGEMENT
  1286 +##############################################################################
  1287 +
  1288 +Отримати internal id по UAid для договору
  1289 + [Arguments] ${username} ${contract_uaid}
  1290 + Log ${contract_uaid}
  1291 + Log ${USERS.users['${username}'].contracts_id_map}
  1292 + ${status}= Run Keyword And Return Status Dictionary Should Contain Key ${USERS.users['${username}'].contracts_id_map} ${contract_uaid}
  1293 + Run Keyword and Return If ${status} Get From Dictionary ${USERS.users['${username}'].contracts_id_map} ${contract_uaid}
  1294 + Call Method ${USERS.users['${username}'].contracting_client} get_contracts
  1295 + ${contract_id}= Wait Until Keyword Succeeds 15x 10 sec get_contract_id_by_uaid ${contract_uaid} ${USERS.users['${username}'].contracting_client}
  1296 + Set To Dictionary ${USERS.users['${username}'].contracts_id_map} ${contract_uaid} ${contract_id}
  1297 + [Return] ${contract_id}
  1298 +
  1299 +
  1300 +Пошук договору по ідентифікатору
  1301 + [Arguments] ${username} ${contract_uaid}
  1302 + ${internalid}= openprocurement_client.Отримати internal id по UAid для договору ${username} ${contract_uaid}
  1303 + ${contract}= Call Method ${USERS.users['${username}'].contracting_client} get_contract ${internalid}
  1304 + Set To Dictionary ${USERS.users['${username}']} contract_data=${contract}
  1305 + ${contract}= munch_dict arg=${contract}
  1306 + Log ${contract}
  1307 + [return] ${contract}
... ...
Please register or login to post a comment