Commit b6f603b65b8666c4a7d084d39e1f0f734660da37
1 parent
23bdbd24
-Create "priceQuotationProcedure.robot"
-Add "priceQuotation.txt" file with arguments -New variable "Profile" was added for possibility create profile with valid/invalid profile parameter -Possible create tender with "procurementMethodType": "priceQuotation"
Showing
8 changed files
with
80 additions
and
1 deletions
@@ -32,6 +32,7 @@ ${ERROR_PLAN_MESSAGE}= Calling method 'get_plan' failed: ResourceGone: {"status | @@ -32,6 +32,7 @@ ${ERROR_PLAN_MESSAGE}= Calling method 'get_plan' failed: ResourceGone: {"status | ||
32 | ... road_index=${${ROAD_INDEX}} | 32 | ... road_index=${${ROAD_INDEX}} |
33 | ... gmdn_index=${${GMDN_INDEX}} | 33 | ... gmdn_index=${${GMDN_INDEX}} |
34 | ... plan_tender=${${PLAN_TENDER}} | 34 | ... plan_tender=${${PLAN_TENDER}} |
35 | + ... profile=${${PROFILE}} | ||
35 | ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} | 36 | ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} |
36 | ${FUNDING_KIND}= Get Variable Value ${FUNDING_KIND} | 37 | ${FUNDING_KIND}= Get Variable Value ${FUNDING_KIND} |
37 | Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} | 38 | Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} |
@@ -237,6 +237,7 @@ Library openprocurement_client.utils | @@ -237,6 +237,7 @@ Library openprocurement_client.utils | ||
237 | ${status}= Set Variable If 'below' in '${MODE}' active.enquiries ${status} | 237 | ${status}= Set Variable If 'below' in '${MODE}' active.enquiries ${status} |
238 | ${status}= Set Variable If 'selection' in '${MODE}' draft.pending ${status} | 238 | ${status}= Set Variable If 'selection' in '${MODE}' draft.pending ${status} |
239 | ${status}= Set Variable If '${status}'=='${EMPTY}' active ${status} | 239 | ${status}= Set Variable If '${status}'=='${EMPTY}' active ${status} |
240 | + ${status}= Set Variable If 'priceQuotation' in '${MODE}' draft.publishing ${status} | ||
240 | Set To Dictionary ${tender['data']} status=${status} | 241 | Set To Dictionary ${tender['data']} status=${status} |
241 | ${tender}= Call Method ${USERS.users['${username}'].client} patch_tender | 242 | ${tender}= Call Method ${USERS.users['${username}'].client} patch_tender |
242 | ... ${tender.data.id} | 243 | ... ${tender.data.id} |
@@ -983,6 +983,17 @@ def test_tender_data_esco(params, submissionMethodDetails, plan_data): | @@ -983,6 +983,17 @@ def test_tender_data_esco(params, submissionMethodDetails, plan_data): | ||
983 | return data | 983 | return data |
984 | 984 | ||
985 | 985 | ||
986 | +def test_tender_data_pq(params, submissionMethodDetails, plan_data): | ||
987 | + data = test_tender_data(params, plan_data, ('tender',), submissionMethodDetails) | ||
988 | + del data["minimalStep"] | ||
989 | + data['procurementMethodType'] = 'priceQuotation' | ||
990 | + if params['profile']: | ||
991 | + data['profile'] = fake.valid_profile() | ||
992 | + else: | ||
993 | + data['profile'] = fake.invalid_profile() | ||
994 | + return munchify(data) | ||
995 | + | ||
996 | + | ||
986 | def test_milestone_data(): | 997 | def test_milestone_data(): |
987 | return munchify({ | 998 | return munchify({ |
988 | "code": random.choice(["prepayment", "postpayment"]), | 999 | "code": random.choice(["prepayment", "postpayment"]), |
@@ -33,6 +33,8 @@ class OP_Provider(BaseProvider): | @@ -33,6 +33,8 @@ class OP_Provider(BaseProvider): | ||
33 | rationale_types = _fake_data.rationale_types | 33 | rationale_types = _fake_data.rationale_types |
34 | title_of_milestones = _fake_data.title_of_milestones | 34 | title_of_milestones = _fake_data.title_of_milestones |
35 | procuringTenderers = _fake_data.procuringTenderers | 35 | procuringTenderers = _fake_data.procuringTenderers |
36 | + valid_profile_ids = _fake_data.valid_profile_ids | ||
37 | + invalid_profile_ids = _fake_data.invalid_profile_ids | ||
36 | 38 | ||
37 | @classmethod | 39 | @classmethod |
38 | def randomize_nb_elements(self, number=10, le=60, ge=140): | 40 | def randomize_nb_elements(self, number=10, le=60, ge=140): |
@@ -223,4 +225,12 @@ class OP_Provider(BaseProvider): | @@ -223,4 +225,12 @@ class OP_Provider(BaseProvider): | ||
223 | 225 | ||
224 | @classmethod | 226 | @classmethod |
225 | def milestone_title(self): | 227 | def milestone_title(self): |
226 | - return self.random_element(self.title_of_milestones) | ||
228 | + return self.random_element(self.title_of_milestones) | ||
229 | + | ||
230 | + @classmethod | ||
231 | + def valid_profile(self): | ||
232 | + return self.random_element(self.valid_profile_ids) | ||
233 | + | ||
234 | + @classmethod | ||
235 | + def invalid_profile(self): | ||
236 | + return self.random_element(self.invalid_profile_ids) |
@@ -8153,5 +8153,11 @@ | @@ -8153,5 +8153,11 @@ | ||
8153 | "dateOfInvoicing", | 8153 | "dateOfInvoicing", |
8154 | "endDateOfTheReportingPeriod", | 8154 | "endDateOfTheReportingPeriod", |
8155 | "anotherEvent" | 8155 | "anotherEvent" |
8156 | + ], | ||
8157 | + "valid_profile_ids": [ | ||
8158 | + "400496-33600000-683398-42000777" | ||
8159 | + ], | ||
8160 | + "invalid_profile_ids": [ | ||
8161 | + "195333-32420000-214469-40000777" | ||
8156 | ] | 8162 | ] |
8157 | } | 8163 | } |
1 | +*** Settings *** | ||
2 | +Resource base_keywords.robot | ||
3 | +Resource aboveThreshold_keywords.robot | ||
4 | +Suite Setup Test Suite Setup | ||
5 | +Suite Teardown Test Suite Teardown | ||
6 | + | ||
7 | + | ||
8 | +*** Variables *** | ||
9 | +${MODE} priceQuotation | ||
10 | +@{USED_ROLES} tender_owner provider provider1 provider2 viewer | ||
11 | +${RESOURCE} tenders | ||
12 | + | ||
13 | +${NUMBER_OF_ITEMS} ${1} | ||
14 | +${NUMBER_OF_LOTS} ${1} | ||
15 | +${NUMBER_OF_MILESTONES} ${0} | ||
16 | +${TENDER_MEAT} ${False} | ||
17 | +${LOT_MEAT} ${False} | ||
18 | +${ITEM_MEAT} ${False} | ||
19 | +${MOZ_INTEGRATION} ${False} | ||
20 | +${VAT_INCLUDED} ${False} | ||
21 | +${ROAD_INDEX} ${False} | ||
22 | +${GMDN_INDEX} ${False} | ||
23 | +${PLAN_TENDER} ${True} | ||
24 | +${PROFILE} ${True} | ||
25 | + | ||
26 | +*** Test Cases *** | ||
27 | +Можливість оголосити тендер | ||
28 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера | ||
29 | + ... tender_owner | ||
30 | + ... ${USERS.users['${tender_owner}'].broker} | ||
31 | + ... create_tender level1 | ||
32 | + ... critical | ||
33 | + [Teardown] Оновити LAST_MODIFICATION_DATE | ||
34 | + Можливість оголосити тендер |
@@ -58,6 +58,7 @@ from .initial_data import ( | @@ -58,6 +58,7 @@ from .initial_data import ( | ||
58 | test_tender_data_planning, | 58 | test_tender_data_planning, |
59 | test_tender_data_openua_defense, | 59 | test_tender_data_openua_defense, |
60 | test_tender_data_framework_agreement, | 60 | test_tender_data_framework_agreement, |
61 | + test_tender_data_pq, | ||
61 | test_tender_data_selection, | 62 | test_tender_data_selection, |
62 | test_bid_competitive_data, | 63 | test_bid_competitive_data, |
63 | test_monitoring_data, | 64 | test_monitoring_data, |
@@ -377,6 +378,9 @@ def prepare_test_tender_data(procedure_intervals, | @@ -377,6 +378,9 @@ def prepare_test_tender_data(procedure_intervals, | ||
377 | elif mode == 'open_esco': | 378 | elif mode == 'open_esco': |
378 | return munchify({'data': test_tender_data_esco( | 379 | return munchify({'data': test_tender_data_esco( |
379 | tender_parameters, submissionMethodDetails, plan_data)}) | 380 | tender_parameters, submissionMethodDetails, plan_data)}) |
381 | + elif mode == 'priceQuotation': | ||
382 | + return munchify({'data': test_tender_data_pq(tender_parameters, submissionMethodDetails, plan_data)}) | ||
383 | + | ||
380 | # The previous line needs an explicit keyword argument because, | 384 | # The previous line needs an explicit keyword argument because, |
381 | # unlike previous functions, this one has three arguments. | 385 | # unlike previous functions, this one has three arguments. |
382 | raise ValueError("Invalid mode for prepare_test_tender_data") | 386 | raise ValueError("Invalid mode for prepare_test_tender_data") |
Please
register
or
login
to post a comment