Commit 3d382b3d03730040fff1a67eaace0224d22de832

Authored by Leits
1 parent 9f34015e

Update initial data params for limited procurement

... ... @@ -86,7 +86,7 @@ def test_tender_data(params, periods=("enquiry", "tender")):
86 86 period_dict[period_name + "Period"][j + "Date"] = inc_dt.isoformat()
87 87 data.update(period_dict)
88 88 cpv_group = fake.cpv()[:3]
89   - if params['number_of_lots']:
  89 + if params.get('number_of_lots'):
90 90 data['lots'] = []
91 91 for lot_number in range(params['number_of_lots']):
92 92 lot_id = uuid4().hex
... ... @@ -101,21 +101,21 @@ def test_tender_data(params, periods=("enquiry", "tender")):
101 101 minimalStep = min(lot['minimalStep']['amount'] for lot in data['lots'])
102 102 data['value']['amount'] = value_amount
103 103 data['minimalStep']['amount'] = minimalStep
  104 + if params.get('lot_meat'):
  105 + new_feature = test_feature_data()
  106 + new_feature['featureOf'] = "lot"
  107 + data['lots'][0]['id'] = data['lots'][0].get('id', uuid4().hex)
  108 + new_feature['relatedItem'] = data['lots'][0]['id']
  109 + data['features'].append(new_feature)
104 110 else:
105 111 for i in range(params['number_of_items']):
106 112 new_item = test_item_data(cpv_group)
107 113 data['items'].append(new_item)
108   - if params['tender_meat']:
  114 + if params.get('tender_meat'):
109 115 new_feature = test_feature_data()
110 116 new_feature.featureOf = "tenderer"
111 117 data['features'].append(new_feature)
112   - if params['lot_meat'] and params['number_of_lots']:
113   - new_feature = test_feature_data()
114   - new_feature['featureOf'] = "lot"
115   - data['lots'][0]['id'] = data['lots'][0].get('id', uuid4().hex)
116   - new_feature['relatedItem'] = data['lots'][0]['id']
117   - data['features'].append(new_feature)
118   - if params['item_meat'] and params['number_of_items']:
  118 + if params.get('item_meat'):
119 119 new_feature = test_feature_data()
120 120 new_feature['featureOf'] = "item"
121 121 data['items'][0]['id'] = data['items'][0].get('id', uuid4().hex)
... ...
... ... @@ -54,15 +54,10 @@ Resource resource.robot
54 54 ##############################################################################################
55 55
56 56 Можливість створити закупівлю
57   - ${number_of_lots}= Convert To Integer ${number_of_lots}
58 57 ${number_of_items}= Convert To Integer ${number_of_items}
59 58 ${tender_parameters}= Create Dictionary
60 59 ... mode=${mode}
61 60 ... number_of_items=${number_of_items}
62   - ... number_of_lots=${number_of_lots}
63   - ... tender_meat=${${tender_meat}}
64   - ... lot_meat=${${lot_meat}}
65   - ... item_meat=${${item_meat}}
66 61 ${tender_data}= Підготувати дані для створення тендера ${tender_parameters}
67 62 ${adapted_data}= Адаптувати дані для оголошення тендера ${tender_owner} ${tender_data}
68 63 ${TENDER_UAID}= Викликати для учасника ${tender_owner}
... ...
... ... @@ -9,10 +9,6 @@ ${mode} negotiation.quick
9 9 @{used_roles} tender_owner viewer
10 10
11 11 ${number_of_items} ${1}
12   -${number_of_lots} ${0}
13   -${tender_meat} ${False}
14   -${lot_meat} ${False}
15   -${item_meat} ${False}
16 12
17 13 *** Test Cases ***
18 14 ##############################################################################################
... ...
... ... @@ -9,10 +9,6 @@ ${mode} negotiation
9 9 @{used_roles} tender_owner viewer
10 10
11 11 ${number_of_items} ${1}
12   -${number_of_lots} ${0}
13   -${tender_meat} ${False}
14   -${lot_meat} ${False}
15   -${item_meat} ${False}
16 12
17 13 *** Test Cases ***
18 14 ##############################################################################################
... ...
... ... @@ -9,10 +9,6 @@ ${mode} reporting
9 9 @{used_roles} tender_owner viewer
10 10
11 11 ${number_of_items} ${1}
12   -${number_of_lots} ${0}
13   -${tender_meat} ${False}
14   -${lot_meat} ${False}
15   -${item_meat} ${False}
16 12
17 13 *** Test Cases ***
18 14 ##############################################################################################
... ...
Please register or login to post a comment