Commit 55624629690c33baaf626737bf26b1b6be04974c
Merge pull request #401 from kosaniak/bid_doc_id
Get bid before search document by doc_id
Showing
4 changed files
with
28 additions
and
11 deletions
@@ -42,8 +42,7 @@ Resource base_keywords.robot | @@ -42,8 +42,7 @@ Resource base_keywords.robot | ||
42 | ${confidentialityRationale}= create_fake_sentence | 42 | ${confidentialityRationale}= create_fake_sentence |
43 | ${privat_doc}= create_data_dict data.confidentialityRationale ${confidentialityRationale} | 43 | ${privat_doc}= create_data_dict data.confidentialityRationale ${confidentialityRationale} |
44 | Set To Dictionary ${privat_doc.data} confidentiality=buyerOnly | 44 | Set To Dictionary ${privat_doc.data} confidentiality=buyerOnly |
45 | - ${docid}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid_doc_upload']['upload_response'].data.id} | ||
46 | - Run As ${username} Змінити документацію в ставці ${TENDER['TENDER_UAID']} ${privat_doc} ${docid} | 45 | + Run As ${username} Змінити документацію в ставці ${TENDER['TENDER_UAID']} ${privat_doc} ${USERS.users['${username}']['bid_document']['doc_id']} |
47 | 46 | ||
48 | 47 | ||
49 | Можливість завантажити ${doc_type} документ до пропозиції учасником ${username} | 48 | Можливість завантажити ${doc_type} документ до пропозиції учасником ${username} |
@@ -83,4 +82,4 @@ Resource base_keywords.robot | @@ -83,4 +82,4 @@ Resource base_keywords.robot | ||
83 | 82 | ||
84 | 83 | ||
85 | Активувати тендер другого етапу | 84 | Активувати тендер другого етапу |
86 | - Run As ${tender_owner} активувати другий етап ${TENDER['TENDER_UAID']} | ||
85 | + Run As ${tender_owner} активувати другий етап ${TENDER['TENDER_UAID']} |
@@ -970,15 +970,25 @@ Resource resource.robot | @@ -970,15 +970,25 @@ Resource resource.robot | ||
970 | 970 | ||
971 | Можливість завантажити документ в пропозицію користувачем ${username} | 971 | Можливість завантажити документ в пропозицію користувачем ${username} |
972 | ${file_path} ${file_name} ${file_content}= create_fake_doc | 972 | ${file_path} ${file_name} ${file_content}= create_fake_doc |
973 | - ${bid_doc_upload}= Run As ${username} Завантажити документ в ставку ${file_path} ${TENDER['TENDER_UAID']} | ||
974 | - Set To Dictionary ${USERS.users['${username}'].bidresponses} bid_doc_upload=${bid_doc_upload} | 973 | + ${doc_id}= get_id_from_string ${file_name} |
974 | + ${bid_document_data}= Create Dictionary | ||
975 | + ... doc_name=${file_name} | ||
976 | + ... doc_content=${file_content} | ||
977 | + ... doc_id=${doc_id} | ||
978 | + Run As ${username} Завантажити документ в ставку ${file_path} ${TENDER['TENDER_UAID']} | ||
979 | + Set To Dictionary ${USERS.users['${username}']} bid_document=${bid_document_data} | ||
975 | Remove File ${file_path} | 980 | Remove File ${file_path} |
976 | 981 | ||
977 | 982 | ||
978 | Можливість змінити документацію цінової пропозиції користувачем ${username} | 983 | Можливість змінити документацію цінової пропозиції користувачем ${username} |
979 | ${file_path} ${file_name} ${file_content}= create_fake_doc | 984 | ${file_path} ${file_name} ${file_content}= create_fake_doc |
980 | - ${docid}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid_doc_upload']['upload_response'].data.id} | ||
981 | - Run As ${username} Змінити документ в ставці ${TENDER['TENDER_UAID']} ${file_path} ${docid} | 985 | + ${doc_id}= get_id_from_string ${file_name} |
986 | + ${bid_document_modified_data}= Create Dictionary | ||
987 | + ... doc_name=${file_name} | ||
988 | + ... doc_content=${file_content} | ||
989 | + ... doc_id=${doc_id} | ||
990 | + Run As ${username} Змінити документ в ставці ${TENDER['TENDER_UAID']} ${file_path} ${USERS.users['${username}']['bid_document']['doc_id']} | ||
991 | + Set To Dictionary ${USERS.users['${username}']} bid_document_modified=${bid_document_modified_data} | ||
982 | Remove File ${file_path} | 992 | Remove File ${file_path} |
983 | 993 | ||
984 | ############################################################################################## | 994 | ############################################################################################## |
@@ -752,11 +752,13 @@ Library openprocurement_client_helper.py | @@ -752,11 +752,13 @@ Library openprocurement_client_helper.py | ||
752 | 752 | ||
753 | 753 | ||
754 | Змінити документ в ставці | 754 | Змінити документ в ставці |
755 | - [Arguments] ${username} ${tender_uaid} ${path} ${docid} | 755 | + [Arguments] ${username} ${tender_uaid} ${path} ${doc_id} |
756 | ${bid_id}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid'].data.id} | 756 | ${bid_id}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid'].data.id} |
757 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 757 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
758 | ${tender}= set_access_key ${tender} ${USERS.users['${username}']['access_token']} | 758 | ${tender}= set_access_key ${tender} ${USERS.users['${username}']['access_token']} |
759 | - ${response}= Call Method ${USERS.users['${username}'].client} update_bid_document ${path} ${tender} ${bid_id} ${docid} | 759 | + ${bid}= openprocurement_client.Отримати пропозицію ${username} ${tender_uaid} |
760 | + ${bid_doc}= get_document_by_id ${bid.data} ${doc_id} | ||
761 | + ${response}= Call Method ${USERS.users['${username}'].client} update_bid_document ${path} ${tender} ${bid_id} ${bid_doc['id']} | ||
760 | ${uploaded_file} = Create Dictionary | 762 | ${uploaded_file} = Create Dictionary |
761 | ... filepath=${path} | 763 | ... filepath=${path} |
762 | ... upload_response=${response} | 764 | ... upload_response=${response} |
@@ -765,11 +767,13 @@ Library openprocurement_client_helper.py | @@ -765,11 +767,13 @@ Library openprocurement_client_helper.py | ||
765 | 767 | ||
766 | 768 | ||
767 | Змінити документацію в ставці | 769 | Змінити документацію в ставці |
768 | - [Arguments] ${username} ${tender_uaid} ${doc_data} ${docid} | 770 | + [Arguments] ${username} ${tender_uaid} ${doc_data} ${doc_id} |
769 | ${bid_id}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid'].data.id} | 771 | ${bid_id}= Get Variable Value ${USERS.users['${username}'].bidresponses['bid'].data.id} |
770 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 772 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
771 | ${tender}= set_access_key ${tender} ${USERS.users['${username}']['access_token']} | 773 | ${tender}= set_access_key ${tender} ${USERS.users['${username}']['access_token']} |
772 | - ${reply}= Call Method ${USERS.users['${username}'].client} patch_bid_document ${tender} ${doc_data} ${bid_id} ${docid} | 774 | + ${bid}= openprocurement_client.Отримати пропозицію ${username} ${tender_uaid} |
775 | + ${bid_doc}= get_document_by_id ${bid.data} ${doc_id} | ||
776 | + ${reply}= Call Method ${USERS.users['${username}'].client} patch_bid_document ${tender} ${doc_data} ${bid_id} ${bid_doc['id']} | ||
773 | 777 | ||
774 | 778 | ||
775 | Отримати пропозицію | 779 | Отримати пропозицію |
@@ -65,6 +65,10 @@ def get_document_by_id(data, doc_id): | @@ -65,6 +65,10 @@ def get_document_by_id(data, doc_id): | ||
65 | for document in cancellation.get('documents', []): | 65 | for document in cancellation.get('documents', []): |
66 | if doc_id in document.get('title', ''): | 66 | if doc_id in document.get('title', ''): |
67 | return document | 67 | return document |
68 | + for bid in data.get('bids', []): | ||
69 | + for document in bid.get('documents', []): | ||
70 | + if doc_id in document.get('title', ''): | ||
71 | + return document | ||
68 | raise Exception('Document with id {} not found'.format(doc_id)) | 72 | raise Exception('Document with id {} not found'.format(doc_id)) |
69 | 73 | ||
70 | 74 |
Please
register
or
login
to post a comment