Commit 2373656be36de0ea2cb756f0eac30c7c6a30f12c

Authored by OrysiaDrabych
1 parent 1df406b0

Add MOZ_INTEGRATION parameter

@@ -17,6 +17,7 @@ Resource resource.robot @@ -17,6 +17,7 @@ Resource resource.robot
17 ... lot_meat=${${LOT_MEAT}} 17 ... lot_meat=${${LOT_MEAT}}
18 ... item_meat=${${ITEM_MEAT}} 18 ... item_meat=${${ITEM_MEAT}}
19 ... api_host_url=${API_HOST_URL} 19 ... api_host_url=${API_HOST_URL}
  20 + ... moz_integration=${${MOZ_INTEGRATION}}
20 ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE} 21 ${DIALOGUE_TYPE}= Get Variable Value ${DIALOGUE_TYPE}
21 Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE} 22 Run keyword if '${DIALOGUE_TYPE}' != '${None}' Set to dictionary ${tender_parameters} dialogue_type=${DIALOGUE_TYPE}
22 ${tender_data}= Підготувати дані для створення тендера ${tender_parameters} 23 ${tender_data}= Підготувати дані для створення тендера ${tender_parameters}
@@ -150,7 +150,10 @@ def test_tender_data(params, @@ -150,7 +150,10 @@ def test_tender_data(params,
150 inc_dt += timedelta(minutes=params['intervals'][period_name][i]) 150 inc_dt += timedelta(minutes=params['intervals'][period_name][i])
151 period_dict[period_name + "Period"][j + "Date"] = inc_dt.astimezone(TZ).isoformat() 151 period_dict[period_name + "Period"][j + "Date"] = inc_dt.astimezone(TZ).isoformat()
152 data.update(period_dict) 152 data.update(period_dict)
153 - cpv_group = fake.cpv()[:4] 153 + if params.get('moz_integration'):
  154 + cpv_group = 336
  155 + else:
  156 + cpv_group = fake.cpv()[:4]
154 if params.get('number_of_lots'): 157 if params.get('number_of_lots'):
155 data['lots'] = [] 158 data['lots'] = []
156 for lot_number in range(params['number_of_lots']): 159 for lot_number in range(params['number_of_lots']):
@@ -235,7 +235,8 @@ Get Broker Property By Username @@ -235,7 +235,8 @@ Get Broker Property By Username
235 235
236 Підготувати дані для створення предмету закупівлі 236 Підготувати дані для створення предмету закупівлі
237 [Arguments] ${cpv} 237 [Arguments] ${cpv}
238 - ${item}= test_item_data ${cpv[0:4]} 238 + ${index}= Set variable if ${moz_integration} 3 4
  239 + ${item}= test_item_data ${cpv[:${index}]}
239 [Return] ${item} 240 [Return] ${item}
240 241
241 242
@@ -11,8 +11,9 @@ ${MODE} negotiation.quick @@ -11,8 +11,9 @@ ${MODE} negotiation.quick
11 ${NUMBER_OF_ITEMS} ${2} 11 ${NUMBER_OF_ITEMS} ${2}
12 ${NUMBER_OF_LOTS} ${0} 12 ${NUMBER_OF_LOTS} ${0}
13 ${TENDER_MEAT} ${False} 13 ${TENDER_MEAT} ${False}
14 -${LOT_MEAT} ${False}  
15 -${ITEM_MEAT} ${False} 14 +${LOT_MEAT} ${False}
  15 +${ITEM_MEAT} ${False}
  16 +${MOZ_INTEGRATION} ${False}
16 17
17 *** Test Cases *** 18 *** Test Cases ***
18 ############################################################################################## 19 ##############################################################################################
@@ -11,8 +11,9 @@ ${MODE} negotiation @@ -11,8 +11,9 @@ ${MODE} negotiation
11 ${NUMBER_OF_ITEMS} ${2} 11 ${NUMBER_OF_ITEMS} ${2}
12 ${NUMBER_OF_LOTS} ${0} 12 ${NUMBER_OF_LOTS} ${0}
13 ${TENDER_MEAT} ${False} 13 ${TENDER_MEAT} ${False}
14 -${LOT_MEAT} ${False}  
15 -${ITEM_MEAT} ${False} 14 +${LOT_MEAT} ${False}
  15 +${ITEM_MEAT} ${False}
  16 +${MOZ_INTEGRATION} ${False}
16 17
17 *** Test Cases *** 18 *** Test Cases ***
18 ############################################################################################## 19 ##############################################################################################
@@ -101,8 +101,15 @@ class OP_Provider(BaseProvider): @@ -101,8 +101,15 @@ class OP_Provider(BaseProvider):
101 return self.random_element(self.funders_scheme_list) 101 return self.random_element(self.funders_scheme_list)
102 102
103 @classmethod 103 @classmethod
104 - def cpv(self):  
105 - return self.random_element(self.cpvs) 104 + def cpv(self, cpv_group=None):
  105 + if cpv_group:
  106 + cpvs = []
  107 + for cpv_element in self.cpvs:
  108 + if cpv_element.startswith(cpv_group):
  109 + cpvs.append(cpv_element)
  110 + return self.random_element(cpvs)
  111 + else:
  112 + return self.random_element(self.cpvs)
106 113
107 @classmethod 114 @classmethod
108 def fake_item(self, cpv_group=None): 115 def fake_item(self, cpv_group=None):
@@ -15,7 +15,7 @@ ${NUMBER_OF_LOTS} ${1} @@ -15,7 +15,7 @@ ${NUMBER_OF_LOTS} ${1}
15 ${TENDER_MEAT} ${True} 15 ${TENDER_MEAT} ${True}
16 ${LOT_MEAT} ${True} 16 ${LOT_MEAT} ${True}
17 ${ITEM_MEAT} ${True} 17 ${ITEM_MEAT} ${True}
18 - 18 +${MOZ_INTEGRATION} ${False}
19 19
20 *** Test Cases *** 20 *** Test Cases ***
21 Можливість оголосити тендер 21 Можливість оголосити тендер
@@ -11,8 +11,9 @@ ${MODE} reporting @@ -11,8 +11,9 @@ ${MODE} reporting
11 ${NUMBER_OF_ITEMS} ${2} 11 ${NUMBER_OF_ITEMS} ${2}
12 ${NUMBER_OF_LOTS} ${0} 12 ${NUMBER_OF_LOTS} ${0}
13 ${TENDER_MEAT} ${False} 13 ${TENDER_MEAT} ${False}
14 -${LOT_MEAT} ${False}  
15 -${ITEM_MEAT} ${False} 14 +${LOT_MEAT} ${False}
  15 +${ITEM_MEAT} ${False}
  16 +${MOZ_INTEGRATION} ${False}
16 17
17 *** Test Cases *** 18 *** Test Cases ***
18 ############################################################################################## 19 ##############################################################################################
Please register or login to post a comment