Showing
7 changed files
with
30 additions
and
9 deletions
... | ... | @@ -46,7 +46,7 @@ Resource resource.robot |
46 | 46 | ... item_meat=${${ITEM_MEAT}} |
47 | 47 | ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} |
48 | 48 | Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} |
49 | - ${tender_data}= Підготувати дані для створення тендера ${tender_parameters} | |
49 | + ${tender_data}= Підготувати дані для створення плану ${tender_parameters} | |
50 | 50 | ${adapted_data}= Адаптувати дані для оголошення тендера ${tender_data} |
51 | 51 | ${TENDER_UAID}= Run As ${tender_owner} Створити план ${adapted_data} |
52 | 52 | Set To Dictionary ${USERS.users['${tender_owner}']} initial_data=${adapted_data} | ... | ... |
... | ... | @@ -45,7 +45,7 @@ Library openprocurement_client.utils |
45 | 45 | # Uncomment this line if there is need to process files operations without DS. |
46 | 46 | # ${ds_api_wraper}= set variable ${None} |
47 | 47 | ${ds_api_wraper}= prepare_ds_api_wrapper ${DS_HOST_URL} ${auth_ds} |
48 | - ${api_wrapper}= Run Keyword If '${MODE}' == 'planning' | |
48 | + ${api_wrapper}= Run Keyword If '${RESOURCE}' == 'plans' | |
49 | 49 | ... prepare_plan_api_wrapper ${USERS.users['${username}'].api_key} ${API_HOST_URL} ${API_VERSION} |
50 | 50 | ... ELSE prepare_api_wrapper ${USERS.users['${username}'].api_key} ${RESOURCE} ${API_HOST_URL} ${API_VERSION} ${ds_api_wraper} |
51 | 51 | Set To Dictionary ${USERS.users['${username}']} client=${api_wrapper} | ... | ... |
... | ... | @@ -2,6 +2,7 @@ users: |
2 | 2 | Tender_Owner: |
3 | 3 | auth_ds: |
4 | 4 | tenders: [test.quintagroup.com, test.quintagroup.com] |
5 | + plans: [test.quintagroup.com, test.quintagroup.com] | |
5 | 6 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
6 | 7 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
7 | 8 | broker: Quinta |
... | ... | @@ -12,6 +13,7 @@ users: |
12 | 13 | Tender_User: |
13 | 14 | auth_ds: |
14 | 15 | tenders: [test.quintagroup.com, test.quintagroup.com] |
16 | + plans: [test.quintagroup.com, test.quintagroup.com] | |
15 | 17 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
16 | 18 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
17 | 19 | broker: Quinta |
... | ... | @@ -22,6 +24,7 @@ users: |
22 | 24 | Tender_User1: |
23 | 25 | auth_ds: |
24 | 26 | tenders: [test.quintagroup.com, test.quintagroup.com] |
27 | + plans: [test.quintagroup.com, test.quintagroup.com] | |
25 | 28 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
26 | 29 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
27 | 30 | broker: Quinta |
... | ... | @@ -32,6 +35,7 @@ users: |
32 | 35 | Tender_User2: |
33 | 36 | auth_ds: |
34 | 37 | tenders: [test.quintagroup.com, test.quintagroup.com] |
38 | + plans: [test.quintagroup.com, test.quintagroup.com] | |
35 | 39 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
36 | 40 | api_key: e9c3ccb8e8124f26941d5f9639a4ebc3 |
37 | 41 | broker: Quinta |
... | ... | @@ -42,6 +46,7 @@ users: |
42 | 46 | Tender_Viewer: |
43 | 47 | auth_ds: |
44 | 48 | tenders: [test.quintagroup.com, test.quintagroup.com] |
49 | + plans: [test.quintagroup.com, test.quintagroup.com] | |
45 | 50 | auctions: [test.quintagroup.com, bc698baa8b814908bc75405ed3d63548] |
46 | 51 | api_key: "" |
47 | 52 | broker: Quinta | ... | ... |
... | ... | @@ -19,6 +19,10 @@ fake_uk = Factory.create(locale='uk_UA') |
19 | 19 | fake_uk.add_provider(OP_Provider) |
20 | 20 | fake = fake_uk |
21 | 21 | used_identifier_id = [] |
22 | +mode_open = ["belowThreshold", "aboveThresholdUA", "aboveThresholdEU", | |
23 | + "aboveThresholdUA.defense", "competitiveDialogueUA", "competitiveDialogueEU", "esco"] | |
24 | +mode_limited = ["reporting", "negotiation.quick", "negotiation"] | |
25 | + | |
22 | 26 | # This workaround fixes an error caused by missing "catch_phrase" class method |
23 | 27 | # for the "ru_RU" locale in Faker >= 0.7.4 |
24 | 28 | fake_ru.add_provider(CompanyProviderEnUs) |
... | ... | @@ -197,8 +201,8 @@ def test_tender_data_planning(params): |
197 | 201 | "name": fake.description(), |
198 | 202 | }, |
199 | 203 | "tender": { |
200 | - "procurementMethod": "open", | |
201 | - "procurementMethodType": "belowThreshold", | |
204 | + "procurementMethod": "", | |
205 | + "procurementMethodType": params['mode'], | |
202 | 206 | "tenderPeriod": { |
203 | 207 | "startDate": (get_now().isoformat()) |
204 | 208 | } |
... | ... | @@ -222,6 +226,10 @@ def test_tender_data_planning(params): |
222 | 226 | del item_data['deliveryLocation'] |
223 | 227 | del item_data['deliveryDate']['startDate'] |
224 | 228 | data['items'].append(item_data) |
229 | + if params['mode'] in mode_open: | |
230 | + data["tender"]["procurementMethod"] = "open" | |
231 | + if params['mode'] in mode_limited: | |
232 | + data["tender"]["procurementMethod"] = "limited" | |
225 | 233 | return munchify(data) |
226 | 234 | |
227 | 235 | ... | ... |
... | ... | @@ -222,6 +222,16 @@ Get Broker Property By Username |
222 | 222 | [return] ${tender_data} |
223 | 223 | |
224 | 224 | |
225 | +Підготувати дані для створення плану | |
226 | + [Arguments] ${tender_parameters} | |
227 | + ${data}= test_tender_data_planning ${tender_parameters} | |
228 | + ${tender_data}= Create Dictionary data=${data} | |
229 | + ${TENDER}= Create Dictionary | |
230 | + Set Global Variable ${TENDER} | |
231 | + Log ${tender_data} | |
232 | + [return] ${tender_data} | |
233 | + | |
234 | + | |
225 | 235 | Підготувати дані для створення предмету закупівлі |
226 | 236 | [Arguments] ${cpv} |
227 | 237 | ${item}= test_item_data ${cpv[0:4]} |
... | ... | @@ -439,7 +449,7 @@ Log differences between dicts |
439 | 449 | |
440 | 450 | Оновити сторінку |
441 | 451 | [Arguments] ${username} |
442 | - Run Keyword If '${MODE}' == 'planning' Run As ${username} Оновити сторінку з планом ${TENDER['TENDER_UAID']} | |
452 | + Run Keyword If '${RESOURCE}' == 'plans' Run As ${username} Оновити сторінку з планом ${TENDER['TENDER_UAID']} | |
443 | 453 | ... ELSE Run As ${username} Оновити сторінку з тендером ${TENDER['TENDER_UAID']} |
444 | 454 | |
445 | 455 | ... | ... |
... | ... | @@ -333,9 +333,6 @@ def prepare_test_tender_data(procedure_intervals, |
333 | 333 | tender_parameters, |
334 | 334 | submissionMethodDetails=submissionMethodDetails, |
335 | 335 | accelerator=accelerator)}) |
336 | - elif mode == 'planning': | |
337 | - return munchify({'data': test_tender_data_planning( | |
338 | - tender_parameters)}) | |
339 | 336 | # The previous line needs an explicit keyword argument because, |
340 | 337 | # unlike previous functions, this one has three arguments. |
341 | 338 | raise ValueError("Invalid mode for prepare_test_tender_data") | ... | ... |
Please
register
or
login
to post a comment