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