Commit 9677cb1a7620f34299b2abab82e1d89e0620fa28
1 parent
b62f06b6
Rename `get_id_from_doc_name` into `get_id_from_string`
Add `c` prefix to regex in order to include ids in cancellations.
Showing
3 changed files
with
9 additions
and
9 deletions
@@ -42,7 +42,7 @@ Resource resource.robot | @@ -42,7 +42,7 @@ Resource resource.robot | ||
42 | Можливість додати документацію до тендера | 42 | Можливість додати документацію до тендера |
43 | ${file_path} ${file_name} ${file_content}= create_fake_doc | 43 | ${file_path} ${file_name} ${file_content}= create_fake_doc |
44 | Run As ${tender_owner} Завантажити документ ${file_path} ${TENDER['TENDER_UAID']} | 44 | Run As ${tender_owner} Завантажити документ ${file_path} ${TENDER['TENDER_UAID']} |
45 | - ${doc_id}= get_id_from_doc_name ${file_name} | 45 | + ${doc_id}= get_id_from_string ${file_name} |
46 | ${tender_document}= Create Dictionary | 46 | ${tender_document}= Create Dictionary |
47 | ... doc_name=${file_name} | 47 | ... doc_name=${file_name} |
48 | ... doc_id=${doc_id} | 48 | ... doc_id=${doc_id} |
@@ -162,7 +162,7 @@ Resource resource.robot | @@ -162,7 +162,7 @@ Resource resource.robot | ||
162 | ${lot_id}= get_id_from_object ${USERS.users['${tender_owner}'].tender_data.data.lots[${lot_index}]} | 162 | ${lot_id}= get_id_from_object ${USERS.users['${tender_owner}'].tender_data.data.lots[${lot_index}]} |
163 | ${file_path} ${file_name} ${file_content}= create_fake_doc | 163 | ${file_path} ${file_name} ${file_content}= create_fake_doc |
164 | Run As ${tender_owner} Завантажити документ в лот ${file_path} ${TENDER['TENDER_UAID']} ${lot_id} | 164 | Run As ${tender_owner} Завантажити документ в лот ${file_path} ${TENDER['TENDER_UAID']} ${lot_id} |
165 | - ${doc_id}= get_id_from_doc_name ${file_name} | 165 | + ${doc_id}= get_id_from_string ${file_name} |
166 | ${data}= Create Dictionary | 166 | ${data}= Create Dictionary |
167 | ... doc_name=${file_name} | 167 | ... doc_name=${file_name} |
168 | ... doc_id=${doc_id} | 168 | ... doc_id=${doc_id} |
@@ -528,7 +528,7 @@ Resource resource.robot | @@ -528,7 +528,7 @@ Resource resource.robot | ||
528 | ... ${TENDER['TENDER_UAID']} | 528 | ... ${TENDER['TENDER_UAID']} |
529 | ... ${claim} | 529 | ... ${claim} |
530 | ... ${file_path} | 530 | ... ${file_path} |
531 | - ${doc_id}= get_id_from_doc_name ${file_name} | 531 | + ${doc_id}= get_id_from_string ${file_name} |
532 | ${claim_data}= Create Dictionary | 532 | ${claim_data}= Create Dictionary |
533 | ... claim=${claim} | 533 | ... claim=${claim} |
534 | ... complaintID=${complaintID} | 534 | ... complaintID=${complaintID} |
@@ -550,7 +550,7 @@ Resource resource.robot | @@ -550,7 +550,7 @@ Resource resource.robot | ||
550 | ... ${claim} | 550 | ... ${claim} |
551 | ... ${lot_id} | 551 | ... ${lot_id} |
552 | ... ${file_path} | 552 | ... ${file_path} |
553 | - ${doc_id}= get_id_from_doc_name ${file_name} | 553 | + ${doc_id}= get_id_from_string ${file_name} |
554 | ${claim_data}= Create Dictionary | 554 | ${claim_data}= Create Dictionary |
555 | ... claim=${claim} | 555 | ... claim=${claim} |
556 | ... complaintID=${complaintID} | 556 | ... complaintID=${complaintID} |
@@ -571,7 +571,7 @@ Resource resource.robot | @@ -571,7 +571,7 @@ Resource resource.robot | ||
571 | ... ${claim} | 571 | ... ${claim} |
572 | ... ${award_index} | 572 | ... ${award_index} |
573 | ... ${file_path} | 573 | ... ${file_path} |
574 | - ${doc_id}= get_id_from_doc_name ${file_name} | 574 | + ${doc_id}= get_id_from_string ${file_name} |
575 | ${claim_data}= Create Dictionary | 575 | ${claim_data}= Create Dictionary |
576 | ... claim=${claim} | 576 | ... claim=${claim} |
577 | ... complaintID=${complaintID} | 577 | ... complaintID=${complaintID} |
@@ -962,7 +962,7 @@ Resource resource.robot | @@ -962,7 +962,7 @@ Resource resource.robot | ||
962 | ... ${TENDER['TENDER_UAID']} | 962 | ... ${TENDER['TENDER_UAID']} |
963 | ... ${supplier_data} | 963 | ... ${supplier_data} |
964 | ... ${file_path} | 964 | ... ${file_path} |
965 | - ${doc_id}= get_id_from_doc_name ${file_name} | 965 | + ${doc_id}= get_id_from_string ${file_name} |
966 | Set to dictionary ${USERS.users['${tender_owner}']} award_doc_name=${file_name} award_doc_id=${doc_id} award_doc_content=${file_content} | 966 | Set to dictionary ${USERS.users['${tender_owner}']} award_doc_name=${file_name} award_doc_id=${doc_id} award_doc_content=${file_content} |
967 | Remove File ${file_path} | 967 | Remove File ${file_path} |
968 | 968 |
@@ -269,7 +269,7 @@ Get Broker Property By Username | @@ -269,7 +269,7 @@ Get Broker Property By Username | ||
269 | [Arguments] ${username} | 269 | [Arguments] ${username} |
270 | ${cancellation_reason}= create_fake_sentence | 270 | ${cancellation_reason}= create_fake_sentence |
271 | ${file_path} ${file_name} ${file_content}= create_fake_doc | 271 | ${file_path} ${file_name} ${file_content}= create_fake_doc |
272 | - ${doc_id}= get_id_from_doc_name ${file_name} | 272 | + ${doc_id}= get_id_from_string ${file_name} |
273 | ${document}= Create Dictionary | 273 | ${document}= Create Dictionary |
274 | ... doc_path=${file_path} | 274 | ... doc_path=${file_path} |
275 | ... doc_name=${file_name} | 275 | ... doc_name=${file_name} |
@@ -409,8 +409,8 @@ def get_id_from_object(obj): | @@ -409,8 +409,8 @@ def get_id_from_object(obj): | ||
409 | return obj_id.group(1) | 409 | return obj_id.group(1) |
410 | 410 | ||
411 | 411 | ||
412 | -def get_id_from_doc_name(name): | ||
413 | - return re.match(r'd\-[0-9a-fA-F]{8}', name).group(0) | 412 | +def get_id_from_string(string): |
413 | + return re.match(r'[dc]\-[0-9a-fA-F]{8}', string).group(0) | ||
414 | 414 | ||
415 | 415 | ||
416 | def get_object_type_by_id(object_id): | 416 | def get_object_type_by_id(object_id): |
Please
register
or
login
to post a comment