...
|
...
|
@@ -72,6 +72,9 @@ def test_tender_data(params, periods=("enquiry", "tender")): |
72
|
72
|
"items": [],
|
73
|
73
|
"features": []
|
74
|
74
|
}
|
|
75
|
+ accelerator = params['intervals']['accelerator']
|
|
76
|
+ data['procurementMethodDetails'] = 'quick, ' \
|
|
77
|
+ 'accelerator={}'.format(accelerator)
|
75
|
78
|
data["procuringEntity"]["kind"] = "other"
|
76
|
79
|
if data.get("mode") == "test":
|
77
|
80
|
data["title"] = u"[ТЕСТУВАННЯ] {}".format(data["title"])
|
...
|
...
|
@@ -144,14 +147,12 @@ def test_tender_data_limited(params): |
144
|
147
|
"stateLegalServices"
|
145
|
148
|
)
|
146
|
149
|
cause = fake.random_element(cause_variants)
|
147
|
|
- data.update({"cause": cause})
|
148
|
|
- if params['mode'] == "negotiation.quick":
|
|
150
|
+ elif params['mode'] == "negotiation.quick":
|
149
|
151
|
cause_variants = ('quick',)
|
150
|
|
- cause = fake.random_element(cause_variants)
|
151
|
|
- data.update({"cause": cause})
|
152
|
152
|
if params['mode'] in ("negotiation", "negotiation.quick"):
|
|
153
|
+ cause = fake.random_element(cause_variants)
|
153
|
154
|
data.update({
|
154
|
|
- "procurementMethodDetails": "quick, accelerator=1440",
|
|
155
|
+ "cause": cause,
|
155
|
156
|
"causeDescription": fake.description()
|
156
|
157
|
})
|
157
|
158
|
return munchify(data)
|
...
|
...
|
@@ -350,33 +351,21 @@ def test_lot_document_data(document, lot_id): |
350
|
351
|
|
351
|
352
|
|
352
|
353
|
def test_tender_data_openua(params):
|
353
|
|
- accelerator = params['intervals']['accelerator']
|
354
|
|
- # Since `accelerator` field is not really a list containing timings
|
355
|
|
- # for a period called `acceleratorPeriod`, let's remove it :)
|
356
|
|
- del params['intervals']['accelerator']
|
357
|
354
|
# We should not provide any values for `enquiryPeriod` when creating
|
358
|
355
|
# an openUA or openEU procedure. That field should not be present at all.
|
359
|
356
|
# Therefore, we pass a nondefault list of periods to `test_tender_data()`.
|
360
|
357
|
data = test_tender_data(params, ('tender',))
|
361
|
358
|
data['procurementMethodType'] = 'aboveThresholdUA'
|
362
|
|
- data['procurementMethodDetails'] = 'quick, ' \
|
363
|
|
- 'accelerator={}'.format(accelerator)
|
364
|
359
|
data['procuringEntity']['kind'] = 'general'
|
365
|
360
|
return data
|
366
|
361
|
|
367
|
362
|
|
368
|
363
|
def test_tender_data_openeu(params):
|
369
|
|
- accelerator = params['intervals']['accelerator']
|
370
|
|
- # Since `accelerator` field is not really a list containing timings
|
371
|
|
- # for a period called `acceleratorPeriod`, let's remove it :)
|
372
|
|
- del params['intervals']['accelerator']
|
373
|
364
|
# We should not provide any values for `enquiryPeriod` when creating
|
374
|
365
|
# an openUA or openEU procedure. That field should not be present at all.
|
375
|
366
|
# Therefore, we pass a nondefault list of periods to `test_tender_data()`.
|
376
|
367
|
data = test_tender_data(params, ('tender',))
|
377
|
368
|
data['procurementMethodType'] = 'aboveThresholdEU'
|
378
|
|
- data['procurementMethodDetails'] = 'quick, ' \
|
379
|
|
- 'accelerator={}'.format(accelerator)
|
380
|
369
|
data['title_en'] = "[TESTING]"
|
381
|
370
|
for item_number, item in enumerate(data['items']):
|
382
|
371
|
item['description_en'] = "Test item #{}".format(item_number)
|
...
|
...
|
|