...
|
...
|
@@ -680,4 +680,46 @@ def test_elimination_report(corruption, relatedParty_id): |
680
|
680
|
"description": fake_en.sentence(nb_words=10, variable_nb_words=True)
|
681
|
681
|
}
|
682
|
682
|
}
|
683
|
|
- }) |
|
|
\ No newline at end of file |
|
683
|
+ })
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+def test_tender_data_esco(params, submissionMethodDetails):
|
|
687
|
+ data = test_tender_data(params, ('tender',), submissionMethodDetails)
|
|
688
|
+ data['procurementMethodType'] = 'esco'
|
|
689
|
+ data['title_en'] = "[TESTING]"
|
|
690
|
+ for item_number, item in enumerate(data['items']):
|
|
691
|
+ item['description_en'] = "Test item #{}".format(item_number)
|
|
692
|
+ data['procuringEntity']['name_en'] = fake_en.name()
|
|
693
|
+ data['procuringEntity']['contactPoint']['name_en'] = fake_en.name()
|
|
694
|
+ data['procuringEntity']['contactPoint']['availableLanguage'] = "en"
|
|
695
|
+ data['procuringEntity']['identifier']['legalName_en'] = fake_en.sentence(nb_words=10, variable_nb_words=True)
|
|
696
|
+ data['procuringEntity']['kind'] = 'general'
|
|
697
|
+ data['minimalStepPercentage'] = float(round(random.uniform(0.015, 0.03), 5))
|
|
698
|
+ data['fundingKind'] = params['fundingKind']
|
|
699
|
+ data['NBUdiscountRate'] = float(round(random.uniform(0, 0.99), 5))
|
|
700
|
+ percentage_list = []
|
|
701
|
+ del data["value"]
|
|
702
|
+ del data["minimalStep"]
|
|
703
|
+ for index in range(params['number_of_lots']):
|
|
704
|
+ data['lots'][index]['fundingKind'] = data['fundingKind']
|
|
705
|
+ if index == 0:
|
|
706
|
+ data['lots'][index]['minimalStepPercentage'] = data['minimalStepPercentage']
|
|
707
|
+ else:
|
|
708
|
+ data['lots'][index]['minimalStepPercentage'] = round((float(data['minimalStepPercentage'])-0.0002), 5)
|
|
709
|
+ if data['fundingKind'] == "budget":
|
|
710
|
+ data['lots'][index]['yearlyPaymentsPercentageRange'] = float(round(random.uniform(0.01, 0.8), 5))
|
|
711
|
+ else:
|
|
712
|
+ data['lots'][index]['yearlyPaymentsPercentageRange'] = 0.8
|
|
713
|
+ percentage_list.append(data['lots'][index]['yearlyPaymentsPercentageRange'])
|
|
714
|
+ del data['lots'][index]['value']
|
|
715
|
+ del data['lots'][index]['minimalStep']
|
|
716
|
+ if params['number_of_lots'] == 0:
|
|
717
|
+ if data['fundingKind'] == "budget":
|
|
718
|
+ data['yearlyPaymentsPercentageRange'] = float(round(random.uniform(0.01, 0.8), 3))
|
|
719
|
+ else:
|
|
720
|
+ data['yearlyPaymentsPercentageRange'] = 0.8
|
|
721
|
+ else:
|
|
722
|
+ data['yearlyPaymentsPercentageRange'] = min(percentage_list)
|
|
723
|
+ for index in range(params['number_of_items']):
|
|
724
|
+ del data['items'][index]['deliveryDate']
|
|
725
|
+ return data |
|
|
\ No newline at end of file |
...
|
...
|
|