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