Commit 9677cb1a7620f34299b2abab82e1d89e0620fa28

Authored by mykhaly
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.
... ... @@ -42,7 +42,7 @@ Resource resource.robot
42 42 Можливість додати документацію до тендера
43 43 ${file_path} ${file_name} ${file_content}= create_fake_doc
44 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 46 ${tender_document}= Create Dictionary
47 47 ... doc_name=${file_name}
48 48 ... doc_id=${doc_id}
... ... @@ -162,7 +162,7 @@ Resource resource.robot
162 162 ${lot_id}= get_id_from_object ${USERS.users['${tender_owner}'].tender_data.data.lots[${lot_index}]}
163 163 ${file_path} ${file_name} ${file_content}= create_fake_doc
164 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 166 ${data}= Create Dictionary
167 167 ... doc_name=${file_name}
168 168 ... doc_id=${doc_id}
... ... @@ -528,7 +528,7 @@ Resource resource.robot
528 528 ... ${TENDER['TENDER_UAID']}
529 529 ... ${claim}
530 530 ... ${file_path}
531   - ${doc_id}= get_id_from_doc_name ${file_name}
  531 + ${doc_id}= get_id_from_string ${file_name}
532 532 ${claim_data}= Create Dictionary
533 533 ... claim=${claim}
534 534 ... complaintID=${complaintID}
... ... @@ -550,7 +550,7 @@ Resource resource.robot
550 550 ... ${claim}
551 551 ... ${lot_id}
552 552 ... ${file_path}
553   - ${doc_id}= get_id_from_doc_name ${file_name}
  553 + ${doc_id}= get_id_from_string ${file_name}
554 554 ${claim_data}= Create Dictionary
555 555 ... claim=${claim}
556 556 ... complaintID=${complaintID}
... ... @@ -571,7 +571,7 @@ Resource resource.robot
571 571 ... ${claim}
572 572 ... ${award_index}
573 573 ... ${file_path}
574   - ${doc_id}= get_id_from_doc_name ${file_name}
  574 + ${doc_id}= get_id_from_string ${file_name}
575 575 ${claim_data}= Create Dictionary
576 576 ... claim=${claim}
577 577 ... complaintID=${complaintID}
... ... @@ -962,7 +962,7 @@ Resource resource.robot
962 962 ... ${TENDER['TENDER_UAID']}
963 963 ... ${supplier_data}
964 964 ... ${file_path}
965   - ${doc_id}= get_id_from_doc_name ${file_name}
  965 + ${doc_id}= get_id_from_string ${file_name}
966 966 Set to dictionary ${USERS.users['${tender_owner}']} award_doc_name=${file_name} award_doc_id=${doc_id} award_doc_content=${file_content}
967 967 Remove File ${file_path}
968 968
... ...
... ... @@ -269,7 +269,7 @@ Get Broker Property By Username
269 269 [Arguments] ${username}
270 270 ${cancellation_reason}= create_fake_sentence
271 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 273 ${document}= Create Dictionary
274 274 ... doc_path=${file_path}
275 275 ... doc_name=${file_name}
... ...
... ... @@ -409,8 +409,8 @@ def get_id_from_object(obj):
409 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 416 def get_object_type_by_id(object_id):
... ...
Please register or login to post a comment