Commit b2b3b30409008613f7abc4bf0c4858de007cfe29

Authored by mykhaly
1 parent 1ae9186b

openprocurement_client: Cleaned up limited section

@@ -426,104 +426,103 @@ Library openprocurement_client_helper.py @@ -426,104 +426,103 @@ Library openprocurement_client_helper.py
426 Log ${tender_lot} 426 Log ${tender_lot}
427 [return] ${tender_lot} 427 [return] ${tender_lot}
428 428
  429 +##############################################################################
  430 +# Limited procurement
  431 +##############################################################################
  432 +
  433 +Отримати тендер [modified]
  434 + [Arguments] ${username}
  435 + Log ${username}
  436 + Log ${TENDER['TENDER_UAID']}
  437 + ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${TENDER['TENDER_UAID']}
  438 + ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}
  439 + ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}
  440 + Log ${tender}
  441 + [Return] ${tender}
  442 +
429 443
430 Додати постачальника 444 Додати постачальника
431 - [Arguments] ${username} ${tenderUAID}  
432 - log ${username}  
433 - log ${tenderUAID} 445 + [Arguments] ${username}
  446 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
434 ${supplier_data}= test supplier data 447 ${supplier_data}= test supplier data
435 - log ${supplier_data}  
436 - ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID}  
437 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}  
438 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token} 448 + Log ${supplier_data}
439 ${reply}= Call Method ${USERS.users['${username}'].client} create_award ${tender} ${supplier_data} 449 ${reply}= Call Method ${USERS.users['${username}'].client} create_award ${tender} ${supplier_data}
440 - [return] ${reply} 450 + Log ${reply}
441 451
442 452
443 Підтвердити постачальника 453 Підтвердити постачальника
444 - [Arguments] ${username} ${tenderUAID}  
445 - log ${username}  
446 - log ${tenderUAID}  
447 - ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID}  
448 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}  
449 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
450 - log ${tender}  
451 - ${award_data}= Confirm supplier ${tender['data']['awards'][0]['id']}  
452 - log ${award_data}  
453 - ${reply}= Call Method ${USERS.users['${username}'].client} patch_award ${tender} ${award_data}  
454 - [return] ${reply} 454 + [Arguments] ${username}
  455 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  456 + ${data}= Confirm supplier ${tender['data']['awards'][0]['id']}
  457 + Log ${data}
  458 + ${reply}= Call Method ${USERS.users['${username}'].client} patch_award ${tender} ${data}
  459 + Log ${reply}
455 460
456 461
457 Додати запит на скасування 462 Додати запит на скасування
458 - [Arguments] ${username} ${tenderUAID}  
459 - ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID}  
460 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}  
461 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
462 - ${cancel_data}= Cancel tender prost :))  
463 - log ${cancel_data}  
464 - ${reply}= Call Method ${USERS.users['${username}'].client} create_cancellation ${tender} ${cancel_data}  
465 - [return] ${reply} 463 + [Arguments] ${username}
  464 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  465 + ${CANCELLATION_REASON} Set variable prost :))
  466 + Set suite variable ${CANCELLATION_REASON}
  467 + ${data}= Cancel tender ${CANCELLATION_REASON}
  468 + Log ${data}
  469 + ${reply}= Call Method ${USERS.users['${username}'].client} create_cancellation ${tender} ${data}
  470 + Log ${reply}
466 471
467 472
468 Завантажити документацію до запиту на скасування 473 Завантажити документацію до запиту на скасування
469 - [Arguments] ${username} ${path} ${tenderid}  
470 - log ${username}  
471 - log ${path}  
472 - log ${tenderid}  
473 - ${internalid}= Отримати internal id по UAid ${username} ${tenderid}  
474 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${internalid}  
475 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
476 - ${response}= Call Method ${USERS.users['${username}'].client} upload_cancellation_document ${path} ${tender} ${tender['data']['cancellations'][0]['id']}  
477 - log ${response}  
478 - ${uploaded_file} = Create Dictionary filepath ${path} upload_response ${response}  
479 - [return] ${uploaded_file} 474 + [Arguments] ${username}
  475 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  476 + ${FIRST_CANCELLATION_DOCUMENT}= create_fake_doc
  477 + Set suite variable ${FIRST_CANCELLATION_DOCUMENT}
  478 + ${cancel_num} Set variable 0
  479 + Log ${cancel_num}
  480 + ${reply}= Call Method ${USERS.users['${username}'].client} upload_cancellation_document ${FIRST_CANCELLATION_DOCUMENT} ${tender} ${tender['data']['cancellations'][${cancel_num}]['id']}
  481 + Log ${reply}
480 482
481 483
482 Змінити опис документа в скасуванні 484 Змінити опис документа в скасуванні
483 - [Arguments] ${username} ${tenderUAID}  
484 - Log ${username}  
485 - Log ${tenderUAID}  
486 - ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID}  
487 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}  
488 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
489 - ${data}= change_cancellation_document_field description test_description  
490 - log ${data}  
491 - ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation_document ${tender} ${data}  
492 - [return] ${reply} 485 + [Arguments] ${username}
  486 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  487 + ${CANCELLATION_DOCUMENT_DESCRIPTION} Set variable test description
  488 + Set suite variable ${CANCELLATION_DOCUMENT_DESCRIPTION}
  489 + ${cancellation_document_field} Set variable description
  490 + ${data}= change_cancellation_document_field ${cancellation_document_field} ${CANCELLATION_DOCUMENT_DESCRIPTION}
  491 + Log ${data}
  492 + ${cancel_num} Set variable 0
  493 + ${doc_num} Set variable 0
  494 + ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation_document ${tender} ${data} ${cancel_num} ${doc_num}
  495 + Log ${reply}
493 496
494 497
495 Завантажити нову версію документа до запиту на скасування 498 Завантажити нову версію документа до запиту на скасування
496 - [Arguments] ${username} ${path}  
497 - ${internalid}= Отримати internal id по UAid ${username} ${TENDER['TENDER_UAID']}  
498 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${internalid}  
499 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
500 - ${response}= Call Method ${USERS.users['${username}'].client} update_cancellation_document ${path} ${tender} ${tender['data']['cancellations'][0]['id']} ${tender['data']['cancellations'][0]['documents'][0]['id']}  
501 - ${uploaded_file} = Create Dictionary filepath ${path} upload_response ${response}  
502 - Log ${uploaded_file}  
503 - [return] ${uploaded_file} 499 + [Arguments] ${username}
  500 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  501 + ${SECOND_CANCELLATION_DOCUMENT}= create_fake_doc
  502 + Set suite variable ${SECOND_CANCELLATION_DOCUMENT}
  503 + Log ${SECOND_CANCELLATION_DOCUMENT}
  504 + ${cancel_num} Set variable 0
  505 + ${doc_num} Set variable 0
  506 + ${reply}= Call Method ${USERS.users['${username}'].client} update_cancellation_document ${SECOND_CANCELLATION_DOCUMENT} ${tender} ${tender['data']['cancellations'][${cancel_num}]['id']} ${tender['data']['cancellations'][${cancel_num}]['documents'][${doc_num}]['id']}
  507 + Log ${reply}
504 508
505 509
506 Підтвердити скасування закупівлі 510 Підтвердити скасування закупівлі
507 - [Arguments] ${username} ${tenderUAID}  
508 - log ${username}  
509 - log ${tenderUAID}  
510 - ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID}  
511 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}  
512 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
513 - ${data}= Confirm cancellation ${tender['data']['cancellations'][0]['id']}  
514 - log ${data} 511 + [Arguments] ${username}
  512 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  513 + ${cancel_num} Set variable 0
  514 + Log ${cancel_num}
  515 + ${data}= Confirm cancellation ${tender['data']['cancellations'][${cancel_num}]['id']}
  516 + Log ${data}
515 ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation ${tender} ${data} 517 ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation ${tender} ${data}
516 - [return] ${reply} 518 + Log ${reply}
517 519
518 520
519 Підтвердити підписання контракту 521 Підтвердити підписання контракту
520 - [Arguments] ${username} ${tenderUAID}  
521 - log ${username}  
522 - log ${tenderUAID}  
523 - ${tenderID}= openprocurement_client.Отримати internal id по UAid ${username} ${tenderUAID}  
524 - ${tender}= Call Method ${USERS.users['${username}'].client} get_tender ${tenderID}  
525 - ${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}  
526 - ${data}= confirm contract ${tender['data']['contracts'][0]['id']}  
527 - log ${data} 522 + [Arguments] ${username}
  523 + ${tender}= Викликати для учасника ${username} Отримати тендер [modified]
  524 + ${contract_num} Set variable 0
  525 + ${data}= confirm contract ${tender['data']['contracts'][${contract_num}]['id']}
  526 + Log ${data}
528 ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data} 527 ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data}
529 - [return] ${reply} 528 + Log ${reply}
Please register or login to post a comment