diff --git a/op_robot_tests/tests_files/base_keywords.robot b/op_robot_tests/tests_files/base_keywords.robot index 295b6cc0d..64ad9e817 100644 --- a/op_robot_tests/tests_files/base_keywords.robot +++ b/op_robot_tests/tests_files/base_keywords.robot @@ -15,6 +15,7 @@ Resource resource.robot ... item_meat=${${ITEM_MEAT}} ... api_host_url=${API_HOST_URL} ... minNumberOfQualifiedBids=${minNumberOfQualifiedBids} + ... item_address=${${ITEM_ADDRESS}} ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} ${tender_data}= Підготувати дані для створення тендера ${tender_parameters} diff --git a/op_robot_tests/tests_files/initial_data.py b/op_robot_tests/tests_files/initial_data.py index 872ada024..f40020aed 100644 --- a/op_robot_tests/tests_files/initial_data.py +++ b/op_robot_tests/tests_files/initial_data.py @@ -315,7 +315,10 @@ def test_tender_data_dgf_other(params): data["procuringEntity"] = fake.procuringEntity_other() for i in range(params['number_of_items']): - scheme_group_other = fake.scheme_other()[:4] - new_item = test_item_data(scheme_group_other) + if params.get('item_address'): + scheme_group = fake.scheme_other()[:4] + else: + scheme_group = fake.scheme_no_validation()[:4] + new_item = test_item_data(scheme_group) data['items'].append(new_item) return data diff --git a/op_robot_tests/tests_files/op_faker/op_faker.py b/op_robot_tests/tests_files/op_faker/op_faker.py index f17d65f6e..b83d73ac7 100644 --- a/op_robot_tests/tests_files/op_faker/op_faker.py +++ b/op_robot_tests/tests_files/op_faker/op_faker.py @@ -24,6 +24,7 @@ class OP_Provider(BaseProvider): addresses = __fake_data.addresses classifications_other = __fake_data.classifications_other schemes_other = __fake_data.schemes_other + schemes_no_validation = __fake_data.schemes_no_validation items_base_data_other = __fake_data.items_base_data_other additionalIdentifiers = __fake_data.additionalIdentifiers @@ -105,6 +106,10 @@ def procuringEntity_other(self): def scheme_other(self): return self.random_element(self.schemes_other) + @classmethod + def scheme_no_validation(self): + return self.random_element(self.schemes_no_validation) + @classmethod def additionalIdentifier(self): return self.random_element(self.additionalIdentifiers) @@ -135,16 +140,20 @@ def fake_item(self, scheme_group): classification = entity break - address = self.random_element(self.addresses) item = { "description": item_base_data["description"], "description_ru": item_base_data["description_ru"], "description_en": item_base_data["description_en"], "classification": classification["classification"], "additionalClassifications": classification["additionalClassifications"], - "address": address["deliveryAddress"], - "deliveryLocation": address["deliveryLocation"], "unit": item_base_data["unit"], "quantity": self.randomize_nb_elements(number=item_base_data["quantity"], le=80, ge=120) } - return deepcopy(item) + + if classification["classification"]["id"] not in self.schemes_no_validation: + address = self.random_element(self.addresses) + item.update({ + "address": address["deliveryAddress"] + }) + + return deepcopy(item) \ No newline at end of file diff --git a/op_robot_tests/tests_files/op_faker/op_faker_data.json b/op_robot_tests/tests_files/op_faker/op_faker_data.json index f707e3321..a38fd227a 100644 --- a/op_robot_tests/tests_files/op_faker/op_faker_data.json +++ b/op_robot_tests/tests_files/op_faker/op_faker_data.json @@ -3053,8 +3053,8 @@ "additionalClassifications": [ { "scheme": "CPVS", - "id": "PA01-7", - "description": "Оренда" + "id": "RB07-8", + "description": "У сфері міжнародної економіки" } ], "classification": { @@ -3062,6 +3062,76 @@ "id": "98910000-5", "description": "Послуги міжнародних організацій та органів" } + }, + { + "additionalClassifications": [ + { + "scheme": "CPVS", + "id": "FG22-5", + "description": "Для косметичних цілей" + } + ], + "classification": { + "scheme": "CPV", + "id": "98322110-0", + "description": "Косметичні послуги" + } + }, + { + "additionalClassifications": [ + { + "scheme": "CPVS", + "id": "SB01-1", + "description": "Для страхування" + } + ], + "classification": { + "scheme": "CPV", + "id": "66512220-0", + "description": "Послуги з медичного страхування" + } + }, + { + "additionalClassifications": [ + { + "scheme": "CPVS", + "id": "SA01-0", + "description": "Для банківської діяльності" + } + ], + "classification": { + "scheme": "CPV", + "id": "66112000-8", + "description": "Депозитні послуги" + } + }, + { + "additionalClassifications": [ + { + "scheme": "CPVS", + "id": "SA01-0", + "description": "Для банківської діяльності" + } + ], + "classification": { + "scheme": "CAV-PS", + "id": "07120000-6", + "description": "Кредити Юридичних осіб заставні" + } + }, + { + "additionalClassifications": [ + { + "scheme": "CPVS", + "id": "SA01-0", + "description": "Для банківської діяльності" + } + ], + "classification": { + "scheme": "CAV-PS", + "id": "07220000-7", + "description": "Кредити Фізичних осіб заставні" + } } ], "units": [ @@ -3154,11 +3224,18 @@ "30111000-0", "34110000-1", "39710000-2", - "16720000-8", - "98910000-5" + "16720000-8" + ], + "schemes_no_validation": [ + "98910000-5", + "98322110-0", + "66512220-0", + "66112000-8", + "07120000-6", + "07220000-7" ], "items_base_data_other": [ - { + { "scheme_id": "05110000-9", "description": "Молокозаводи", "description_ru": "Молокозаводы", @@ -3224,7 +3301,7 @@ "name": "штуки" } }, - { + { "scheme_id": "34110000-1", "description": "Легкові автомобілі", "description_ru": "Легковые автомобили", @@ -3235,7 +3312,7 @@ "name": "штуки" } }, - { + { "scheme_id": "39710000-2", "description": "Електричні побутові прилади", "description_ru": "Электрические бытовые приборы", @@ -3246,7 +3323,7 @@ "name": "штуки" } }, - { + { "scheme_id": "16720000-8", "description": "Трактори, що були у використанні", "description_ru": "Тракторы бывшие в употреблении", @@ -3256,6 +3333,61 @@ "code": "H87", "name": "штуки" } + }, + { + "scheme_id": "98322110-0", + "description": "Косметичні послуги", + "description_ru": "Косметические услуги", + "description_en": "Cosmetic services", + "quantity": 5, + "unit": { + "code": "H87", + "name": "штуки" + } + }, + { + "scheme_id": "66512220-0", + "description": "Послуги з медичного страхування", + "description_ru": "Услуги по медицинскому страхованию", + "description_en": "Medical insurance services", + "quantity": 5, + "unit": { + "code": "H87", + "name": "штуки" + } + }, + { + "scheme_id": "66112000-8", + "description": "Депозитні послуги", + "description_ru": "Депозитные услуги", + "description_en": "Deposit services", + "quantity": 5, + "unit": { + "code": "H87", + "name": "штуки" + } + }, + { + "scheme_id": "07120000-6", + "description": "Кредити Юридичних осіб заставні", + "description_ru": "Кредиты Юридических лиц закладные", + "description_en": "Legal entities mortgages", + "quantity": 5, + "unit": { + "code": "H87", + "name": "штуки" + } + }, + { + "scheme_id": "07220000-7", + "description": "Кредити Фізичних осіб заставні", + "description_ru": "Кредиты Физических лиц закладные", + "description_en": "Mortgages of private individuals", + "quantity": 5, + "unit": { + "code": "H87", + "name": "штуки" + } } ] } \ No newline at end of file diff --git a/op_robot_tests/tests_files/openProcedure.robot b/op_robot_tests/tests_files/openProcedure.robot index 124c8bf27..127bbcddb 100644 --- a/op_robot_tests/tests_files/openProcedure.robot +++ b/op_robot_tests/tests_files/openProcedure.robot @@ -11,6 +11,7 @@ ${NUMBER_OF_ITEMS} ${1} ${TENDER_MEAT} ${True} ${LOT_MEAT} ${True} ${ITEM_MEAT} ${True} +${ITEM_ADDRESS} ${True} *** Test Cases *** diff --git a/robot_tests_arguments/dgf_other_tender_cancellation.txt b/robot_tests_arguments/dgf_other_tender_cancellation.txt index 0d7fcaa37..2c6dd052f 100644 --- a/robot_tests_arguments/dgf_other_tender_cancellation.txt +++ b/robot_tests_arguments/dgf_other_tender_cancellation.txt @@ -2,6 +2,8 @@ -v minNumberOfQualifiedBids:2 +-v ITEM_ADDRESS: False + -v NUMBER_OF_ITEMS:1 -i create_tender