Commit 0b860e1080d2611fd7098d0d8008348fe2c4a0b4
1 parent
13a9a4e0
add plan tender validation testing
Showing
4 changed files
with
93 additions
and
22 deletions
@@ -175,6 +175,42 @@ ${ERROR_MESSAGE}= Calling method 'get_tender' failed: ResourceGone: {"status": | @@ -175,6 +175,42 @@ ${ERROR_MESSAGE}= Calling method 'get_tender' failed: ResourceGone: {"status": | ||
175 | Set To Dictionary ${TENDER} TENDER_UAID=${TENDER_UAID} | 175 | Set To Dictionary ${TENDER} TENDER_UAID=${TENDER_UAID} |
176 | 176 | ||
177 | 177 | ||
178 | +Можливість оголосити тендер з використанням валідації план-тендер | ||
179 | + [Arguments] ${data_version} | ||
180 | + ${file_path}= Get Variable Value ${ARTIFACT_FILE} artifact.yaml | ||
181 | + ${ARTIFACT}= load_data_from ${file_path} | ||
182 | + Log ${ARTIFACT.tender_uaid} | ||
183 | + ${NUMBER_OF_LOTS}= Convert To Integer ${NUMBER_OF_LOTS} | ||
184 | + ${NUMBER_OF_ITEMS}= Convert To Integer ${NUMBER_OF_ITEMS} | ||
185 | + ${NUMBER_OF_MILESTONES}= Convert To Integer ${NUMBER_OF_MILESTONES} | ||
186 | + ${tender_parameters}= Create Dictionary | ||
187 | + ... mode=${MODE} | ||
188 | + ... number_of_items=${NUMBER_OF_ITEMS} | ||
189 | + ... number_of_lots=${NUMBER_OF_LOTS} | ||
190 | + ... number_of_milestones=${NUMBER_OF_MILESTONES} | ||
191 | + ... tender_meat=${${TENDER_MEAT}} | ||
192 | + ... lot_meat=${${LOT_MEAT}} | ||
193 | + ... item_meat=${${ITEM_MEAT}} | ||
194 | + ... api_host_url=${API_HOST_URL} | ||
195 | + ... moz_integration=${${MOZ_INTEGRATION}} | ||
196 | + ... road_index=${${ROAD_INDEX}} | ||
197 | + ... gmdn_index=${${GMDN_INDEX}} | ||
198 | + ... plan_tender=${${PLAN_TENDER}} | ||
199 | + ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} | ||
200 | + ${FUNDING_KIND}= Get Variable Value ${FUNDING_KIND} | ||
201 | + Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} | ||
202 | + Run keyword if '${FUNDING_KIND}' != '${None}' Set to dictionary ${tender_parameters} fundingKind=${FUNDING_KIND} | ||
203 | + ${plan_data}= Run as ${tender_owner} Пошук плану по ідентифікатору ${ARTIFACT.tender_uaid} | ||
204 | + Log ${plan_data} | ||
205 | + ${tender_data}= Підготувати дані для створення тендера ${tender_parameters} ${plan_data} | ||
206 | + ${adapted_data}= Адаптувати дані для оголошення тендера ${tender_data} | ||
207 | + ${adapted_data_plan_tender}= edit_tender_data_for_plan_tender ${adapted_data} ${MODE} ${data_version} | ||
208 | + Log ${adapted_data_plan_tender} | ||
209 | + ${TENDER_UAID}= Run As ${tender_owner} Створити тендер ${adapted_data_plan_tender} | ||
210 | + Set To Dictionary ${USERS.users['${tender_owner}']} initial_data=${adapted_data_plan_tender} | ||
211 | + Set To Dictionary ${TENDER} TENDER_UAID=${TENDER_UAID} | ||
212 | + | ||
213 | + | ||
178 | Можливість створити об'єкт моніторингу | 214 | Можливість створити об'єкт моніторингу |
179 | ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers} | 215 | ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers} |
180 | ${accelerator}= Get Variable Value ${accelerator} | 216 | ${accelerator}= Get Variable Value ${accelerator} |
@@ -936,16 +936,16 @@ def invalid_INN_data(): | @@ -936,16 +936,16 @@ def invalid_INN_data(): | ||
936 | def invalid_cost_data(): | 936 | def invalid_cost_data(): |
937 | return munchify({ | 937 | return munchify({ |
938 | "scheme": "UA-ROAD", | 938 | "scheme": "UA-ROAD", |
939 | - "id": "М-15", | ||
940 | - "description": "Одеса - Рені (на м. Бухарест)" | 939 | + "id": "Н-08", |
940 | + "description": "Бориспіль - Дніпро - Запоріжжя (через м. Кременчук) - Маріуполь" | ||
941 | }) | 941 | }) |
942 | 942 | ||
943 | 943 | ||
944 | def invalid_gmdn_data(): | 944 | def invalid_gmdn_data(): |
945 | return munchify({ | 945 | return munchify({ |
946 | "scheme": "GMDN", | 946 | "scheme": "GMDN", |
947 | - "id": "33110", | ||
948 | - "description": "Коліматор радіонуклідної системи, високоенергетичний" | 947 | + "id": "10082", |
948 | + "description": "Змішувач амальгами для стоматології" | ||
949 | }) | 949 | }) |
950 | 950 | ||
951 | 951 |
@@ -223,6 +223,46 @@ ${PLAN_TENDER} ${True} | @@ -223,6 +223,46 @@ ${PLAN_TENDER} ${True} | ||
223 | Run Keyword And Expect Error * Можливість оголосити тендер з використанням валідації класифікатор медичних виробів ${6} | 223 | Run Keyword And Expect Error * Можливість оголосити тендер з використанням валідації класифікатор медичних виробів ${6} |
224 | 224 | ||
225 | 225 | ||
226 | +Неможливість опублікувати тендер на закупівлю з невідповідним кодом ЄДРПОУ | ||
227 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера | ||
228 | + ... tender_owner | ||
229 | + ... ${USERS.users['${tender_owner}'].broker} | ||
230 | + ... create_tender_invalid_edrpou level1 | ||
231 | + ... critical | ||
232 | + [Teardown] Оновити LAST_MODIFICATION_DATE | ||
233 | + Можливість оголосити тендер з використанням валідації план-тендер ${1} | ||
234 | + | ||
235 | + | ||
236 | +Неможливість опублікувати тендер на закупівлю з невідповідною схемою | ||
237 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера | ||
238 | + ... tender_owner | ||
239 | + ... ${USERS.users['${tender_owner}'].broker} | ||
240 | + ... create_tender_invalid_schema level1 | ||
241 | + ... critical | ||
242 | + [Teardown] Оновити LAST_MODIFICATION_DATE | ||
243 | + Можливість оголосити тендер з використанням валідації план-тендер ${2} | ||
244 | + | ||
245 | + | ||
246 | +Неможливість опублікувати тендер на закупівлю з невідповідним cpv кодом | ||
247 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера | ||
248 | + ... tender_owner | ||
249 | + ... ${USERS.users['${tender_owner}'].broker} | ||
250 | + ... create_tender_invalid_cpv level1 | ||
251 | + ... critical | ||
252 | + [Teardown] Оновити LAST_MODIFICATION_DATE | ||
253 | + Можливість оголосити тендер з використанням валідації план-тендер ${3} | ||
254 | + | ||
255 | + | ||
256 | +Неможливість опублікувати тендер на закупівлю з невідповідним cpv кодом | ||
257 | + [Tags] ${USERS.users['${tender_owner}'].broker}: Оголошення тендера | ||
258 | + ... tender_owner | ||
259 | + ... ${USERS.users['${tender_owner}'].broker} | ||
260 | + ... create_tender_invalid_procurementMethodType level1 | ||
261 | + ... critical | ||
262 | + [Teardown] Оновити LAST_MODIFICATION_DATE | ||
263 | + Можливість оголосити тендер з використанням валідації план-тендер ${4} | ||
264 | + | ||
265 | + | ||
226 | Можливість знайти тендер по ідентифікатору | 266 | Можливість знайти тендер по ідентифікатору |
227 | [Tags] ${USERS.users['${viewer}'].broker}: Пошук тендера | 267 | [Tags] ${USERS.users['${viewer}'].broker}: Пошук тендера |
228 | ... viewer tender_owner provider provider1 | 268 | ... viewer tender_owner provider provider1 |
@@ -682,23 +682,17 @@ def edit_tender_data_for_mnn(data, mode, data_version): | @@ -682,23 +682,17 @@ def edit_tender_data_for_mnn(data, mode, data_version): | ||
682 | id = {1: '33600000-6', 2: '33632100-0', 3: '33632100-0', 4: '33622200-8', 5: '33600000-6', 6: '33692500-2', 7: '33600000-6', 8: '33615100-5'} | 682 | id = {1: '33600000-6', 2: '33632100-0', 3: '33632100-0', 4: '33622200-8', 5: '33600000-6', 6: '33692500-2', 7: '33600000-6', 8: '33615100-5'} |
683 | dict_data = unmunchify(data) | 683 | dict_data = unmunchify(data) |
684 | dict_data['data']['items'][0]['classification']['id'] = id[data_version] | 684 | dict_data['data']['items'][0]['classification']['id'] = id[data_version] |
685 | - | ||
686 | if data_version is 3: | 685 | if data_version is 3: |
687 | dict_data['data']['items'][0].pop('additionalClassifications', None) | 686 | dict_data['data']['items'][0].pop('additionalClassifications', None) |
688 | - | ||
689 | if data_version is 4: | 687 | if data_version is 4: |
690 | add_INN = invalid_INN_data() | 688 | add_INN = invalid_INN_data() |
691 | dict_data['data']['items'][0]['additionalClassifications'].append(add_INN) | 689 | dict_data['data']['items'][0]['additionalClassifications'].append(add_INN) |
692 | - | ||
693 | if data_version is 5: | 690 | if data_version is 5: |
694 | dict_data['data']['items'][0].pop('additionalClassifications', None) | 691 | dict_data['data']['items'][0].pop('additionalClassifications', None) |
695 | - | ||
696 | if data_version is 6: | 692 | if data_version is 6: |
697 | dict_data['data']['items'][0]['additionalClassifications'].pop(0) | 693 | dict_data['data']['items'][0]['additionalClassifications'].pop(0) |
698 | - | ||
699 | if data_version is 7: | 694 | if data_version is 7: |
700 | dict_data['data']['items'][0]['additionalClassifications'].pop(1) | 695 | dict_data['data']['items'][0]['additionalClassifications'].pop(1) |
701 | - | ||
702 | if data_version is 8: | 696 | if data_version is 8: |
703 | dict_data['data']['items'][0]['additionalClassifications'].pop(1) | 697 | dict_data['data']['items'][0]['additionalClassifications'].pop(1) |
704 | return munchify(dict_data) | 698 | return munchify(dict_data) |
@@ -707,20 +701,15 @@ def edit_tender_data_for_mnn(data, mode, data_version): | @@ -707,20 +701,15 @@ def edit_tender_data_for_mnn(data, mode, data_version): | ||
707 | def edit_tender_data_for_cost(data, mode, data_version): | 701 | def edit_tender_data_for_cost(data, mode, data_version): |
708 | test_data = {3: 'PQ-17', 4: 'Дорога'} | 702 | test_data = {3: 'PQ-17', 4: 'Дорога'} |
709 | dict_data = unmunchify(data) | 703 | dict_data = unmunchify(data) |
710 | - | ||
711 | if data_version is 1: | 704 | if data_version is 1: |
712 | dict_data['data']['items'][0].pop('additionalClassifications', None) | 705 | dict_data['data']['items'][0].pop('additionalClassifications', None) |
713 | - | ||
714 | if data_version is 2: | 706 | if data_version is 2: |
715 | add_cost = invalid_cost_data() | 707 | add_cost = invalid_cost_data() |
716 | dict_data['data']['items'][0]['additionalClassifications'].append(add_cost) | 708 | dict_data['data']['items'][0]['additionalClassifications'].append(add_cost) |
717 | - | ||
718 | if data_version is 3: | 709 | if data_version is 3: |
719 | dict_data['data']['items'][0]['additionalClassifications'][0]['id'] = test_data[data_version] | 710 | dict_data['data']['items'][0]['additionalClassifications'][0]['id'] = test_data[data_version] |
720 | - | ||
721 | if data_version is 4: | 711 | if data_version is 4: |
722 | dict_data['data']['items'][0]['additionalClassifications'][0]['description'] = test_data[data_version] | 712 | dict_data['data']['items'][0]['additionalClassifications'][0]['description'] = test_data[data_version] |
723 | - | ||
724 | if data_version is 5: | 713 | if data_version is 5: |
725 | add_cost = invalid_cost_data() | 714 | add_cost = invalid_cost_data() |
726 | dict_data['data']['items'][0]['additionalClassifications'][0] = add_cost | 715 | dict_data['data']['items'][0]['additionalClassifications'][0] = add_cost |
@@ -730,24 +719,18 @@ def edit_tender_data_for_cost(data, mode, data_version): | @@ -730,24 +719,18 @@ def edit_tender_data_for_cost(data, mode, data_version): | ||
730 | def edit_tender_data_for_gmdn(data, mode, data_version): | 719 | def edit_tender_data_for_gmdn(data, mode, data_version): |
731 | gmdn_test_data = {3: '9999', 4: 'Виріб'} | 720 | gmdn_test_data = {3: '9999', 4: 'Виріб'} |
732 | dict_data = unmunchify(data) | 721 | dict_data = unmunchify(data) |
733 | - | ||
734 | if data_version is 1: | 722 | if data_version is 1: |
735 | dict_data['data']['items'][0].pop('additionalClassifications', None) | 723 | dict_data['data']['items'][0].pop('additionalClassifications', None) |
736 | - | ||
737 | if data_version is 2: | 724 | if data_version is 2: |
738 | add_gmdn = invalid_gmdn_data() | 725 | add_gmdn = invalid_gmdn_data() |
739 | dict_data['data']['items'][0]['additionalClassifications'].append(add_gmdn) | 726 | dict_data['data']['items'][0]['additionalClassifications'].append(add_gmdn) |
740 | - | ||
741 | if data_version is 3: | 727 | if data_version is 3: |
742 | dict_data['data']['items'][0]['additionalClassifications'][0]['id'] = gmdn_test_data[data_version] | 728 | dict_data['data']['items'][0]['additionalClassifications'][0]['id'] = gmdn_test_data[data_version] |
743 | - | ||
744 | if data_version is 4: | 729 | if data_version is 4: |
745 | dict_data['data']['items'][0]['additionalClassifications'][0]['description'] = gmdn_test_data[data_version] | 730 | dict_data['data']['items'][0]['additionalClassifications'][0]['description'] = gmdn_test_data[data_version] |
746 | - | ||
747 | if data_version is 5: | 731 | if data_version is 5: |
748 | add_gmdn = invalid_gmdn_data() | 732 | add_gmdn = invalid_gmdn_data() |
749 | dict_data['data']['items'][0]['additionalClassifications'][0] = add_gmdn | 733 | dict_data['data']['items'][0]['additionalClassifications'][0] = add_gmdn |
750 | - | ||
751 | if data_version is 6: | 734 | if data_version is 6: |
752 | add_INN = invalid_INN_data() | 735 | add_INN = invalid_INN_data() |
753 | dict_data['data']['items'][0]['additionalClassifications'].append(add_INN) | 736 | dict_data['data']['items'][0]['additionalClassifications'].append(add_INN) |
@@ -759,8 +742,20 @@ def edit_plan_buyers(data, data_version): | @@ -759,8 +742,20 @@ def edit_plan_buyers(data, data_version): | ||
759 | if data_version is 1: | 742 | if data_version is 1: |
760 | add_buyer = invalid_buyers_data() | 743 | add_buyer = invalid_buyers_data() |
761 | dict_data['data']['buyers'].append(add_buyer) | 744 | dict_data['data']['buyers'].append(add_buyer) |
762 | - | ||
763 | if data_version is 2: | 745 | if data_version is 2: |
764 | dict_data['data'].pop('buyers') | 746 | dict_data['data'].pop('buyers') |
747 | + return munchify(dict_data) | ||
765 | 748 | ||
749 | + | ||
750 | +def edit_tender_data_for_plan_tender(data, mode, data_version): | ||
751 | + plan_tedner_test_data = {1: '03222111-4', 2: 'UA-FIN', 3: '11112222', 4: 'aboveThresholdEU'} | ||
752 | + dict_data = unmunchify(data) | ||
753 | + if data_version is 1: | ||
754 | + dict_data['data']['items'][0]['classification']['id'] = plan_tedner_test_data[data_version] | ||
755 | + if data_version is 2: | ||
756 | + dict_data['data']['procuringEntity']['identifier']['scheme'] = plan_tedner_test_data[data_version] | ||
757 | + if data_version is 3: | ||
758 | + dict_data['data']['procuringEntity']['identifier']['id'] = plan_tedner_test_data[data_version] | ||
759 | + if data_version is 4: | ||
760 | + dict_data['data']['procurementMethodType'] = plan_tedner_test_data[data_version] | ||
766 | return munchify(dict_data) | 761 | return munchify(dict_data) |
Please
register
or
login
to post a comment