Commit 4eb39ecf02eb6cb7dc0beca1813b3267a01cfcf1
Committed by
GitHub
Merge pull request #494 from ITVaan/test_for_proxy_server
Перевірка користувача по ЄДР
Showing
4 changed files
with
32 additions
and
3 deletions
... | ... | @@ -18,7 +18,7 @@ Library openprocurement_client_helper.py |
18 | 18 | |
19 | 19 | Підготувати клієнт для користувача |
20 | 20 | [Arguments] ${username} |
21 | - [Documentation] Відкрити браузер, створити об’єкт api wrapper, тощо | |
21 | + [Documentation] Відкрити браузер, створити об’єкт api wrapper, створити об’єкт edr_wrapper, тощо | |
22 | 22 | Log ${API_HOST_URL} |
23 | 23 | Log ${API_VERSION} |
24 | 24 | ${api_wrapper}= prepare_api_wrapper ${USERS.users['${username}'].api_key} ${API_HOST_URL} ${API_VERSION} |
... | ... | @@ -26,7 +26,10 @@ Library openprocurement_client_helper.py |
26 | 26 | Set To Dictionary ${USERS.users['${username}']} access_token=${EMPTY} |
27 | 27 | ${id_map}= Create Dictionary |
28 | 28 | Set To Dictionary ${USERS.users['${username}']} id_map=${id_map} |
29 | - Log Variables | |
29 | + Log ${EDR_HOST_URL} | |
30 | + Log ${EDR_VERSION} | |
31 | + ${edr_wrapper}= prepare_edr_wrapper ${EDR_HOST_URL} ${EDR_VERSION} ${USERS.users['${username}'].auth_edr[0]} ${USERS.users['${username}'].auth_edr[1]} | |
32 | + Set To Dictionary ${USERS.users['${username}']} edr_client=${edr_wrapper} | |
30 | 33 | |
31 | 34 | |
32 | 35 | Завантажити документ |
... | ... | @@ -705,8 +708,16 @@ Library openprocurement_client_helper.py |
705 | 708 | # Bid operations |
706 | 709 | ############################################################################## |
707 | 710 | |
711 | +Перевірити учасника за ЄДРПОУ | |
712 | + [Arguments] ${username} ${edrpou} | |
713 | + ${reply}= Call Method ${USERS.users['${username}'].edr_client} verify_member ${edrpou} | |
714 | + Log ${reply} | |
715 | + | |
716 | + | |
708 | 717 | Подати цінову пропозицію |
709 | 718 | [Arguments] ${username} ${tender_uaid} ${bid} ${lots_ids}=${None} ${features_ids}=${None} |
719 | + ${verify_response}= Run As ${username} Перевірити учасника за ЄДРПОУ ${bid.data.tenderers[0].identifier.id} | |
720 | + Log ${verify_response} | |
710 | 721 | ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
711 | 722 | ${lots_ids}= Run Keyword IF ${lots_ids} Set Variable ${lots_ids} |
712 | 723 | ... ELSE Create List | ... | ... |
1 | -from openprocurement_client.client import Client | |
1 | +from openprocurement_client.client import Client, EDRClient | |
2 | 2 | from openprocurement_client.utils import get_tender_id_by_uaid |
3 | 3 | from openprocurement_client.exceptions import IdNotFound |
4 | 4 | from restkit.errors import RequestFailed, BadStatusLine |
... | ... | @@ -28,6 +28,17 @@ def prepare_api_wrapper(key, host_url, api_version): |
28 | 28 | return StableClient(key, host_url, api_version) |
29 | 29 | |
30 | 30 | |
31 | +class StableEDRClient(EDRClient): | |
32 | + @retry(stop_max_attempt_number=100, wait_random_min=500, | |
33 | + wait_random_max=4000, retry_on_exception=retry_if_request_failed) | |
34 | + def request(self, *args, **kwargs): | |
35 | + return super(StableEDRClient, self).request(*args, **kwargs) | |
36 | + | |
37 | + | |
38 | +def prepare_edr_wrapper(host_url, api_version, username, password): | |
39 | + return StableEDRClient(host_url, api_version, username, password) | |
40 | + | |
41 | + | |
31 | 42 | def get_complaint_internal_id(tender, complaintID): |
32 | 43 | try: |
33 | 44 | for complaint in tender.data.complaints: | ... | ... |
... | ... | @@ -2,19 +2,24 @@ users: |
2 | 2 | Tender_Owner: |
3 | 3 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
4 | 4 | broker: Quinta |
5 | + auth_edr: [test.quintagroup.com, f5111c99a97a45348d8165ba8fcf0d62] | |
5 | 6 | Tender_User: |
6 | 7 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
7 | 8 | broker: Quinta |
9 | + auth_edr: [test.quintagroup.com, f5111c99a97a45348d8165ba8fcf0d62] | |
8 | 10 | Tender_User1: |
9 | 11 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
10 | 12 | broker: Quinta |
13 | + auth_edr: [test.quintagroup.com, f5111c99a97a45348d8165ba8fcf0d62] | |
11 | 14 | Tender_User2: |
12 | 15 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
13 | 16 | broker: Quinta |
17 | + auth_edr: [test.quintagroup.com, f5111c99a97a45348d8165ba8fcf0d62] | |
14 | 18 | Tender_Viewer: |
15 | 19 | api_key: "" |
16 | 20 | broker: Quinta |
17 | 21 | browser: firefox |
22 | + auth_edr: [test.quintagroup.com, f5111c99a97a45348d8165ba8fcf0d62] | |
18 | 23 | Etender_Owner: |
19 | 24 | broker: Etender |
20 | 25 | homepage: "http://bid.uat.e-tender.biz/#/" | ... | ... |
Please
register
or
login
to post a comment