Commit a0d5703472134319e9a1acc14882c87e0e9b570e

Authored by AlexDiatlov
1 parent a20f4b9a

stage 2 competitive dialogue bid data generation

... ... @@ -624,6 +624,21 @@ def test_bid_competitive_data():
624 624 return bid
625 625
626 626
  627 +def test_bid_competitive_data_stage_2(id):
  628 + bid = munchify({
  629 + "data": {
  630 + "tenderers": [
  631 + fake.procuringTenderer()
  632 + ]
  633 + }
  634 + })
  635 + bid.data.tenderers[0].identifier.id = id
  636 + bid.data.tenderers[0].address.countryName_en = translate_country_en(bid.data.tenderers[0].address.countryName)
  637 + bid.data.tenderers[0].address.countryName_ru = translate_country_ru(bid.data.tenderers[0].address.countryName)
  638 + bid.data['status'] = 'draft'
  639 + return bid
  640 +
  641 +
627 642 def test_bid_data():
628 643 bid = munchify({
629 644 "data": {
... ...
... ... @@ -86,7 +86,8 @@ from .initial_data import (
86 86 test_cancellation_data,
87 87 test_cancel_pending_data,
88 88 test_payment_data,
89   - test_24_hours_data
  89 + test_24_hours_data,
  90 + test_bid_competitive_data_stage_2
90 91 )
91 92 from barbecue import chef
92 93 from restkit import request
... ... @@ -621,7 +622,7 @@ def get_object_by_id(data, given_object_id, slice_element, object_id):
621 622 return sliced_object[0]
622 623
623 624
624   -def generate_test_bid_data(tender_data):
  625 +def generate_test_bid_data(tender_data, edrpou=None):
625 626 if tender_data.get('procurementMethodType', '') in (
626 627 'aboveThresholdUA',
627 628 'aboveThresholdUA.defense',
... ... @@ -634,6 +635,12 @@ def generate_test_bid_data(tender_data):
634 635 bid = test_bid_competitive_data()
635 636 bid.data.selfEligible = True
636 637 bid.data.selfQualified = True
  638 + elif tender_data.get('procurementMethodType', '') in (
  639 + 'competitiveDialogueUA.stage2',
  640 + 'competitiveDialogueEU.stage2'):
  641 + bid = test_bid_competitive_data_stage_2(edrpou)
  642 + bid.data.selfEligible = True
  643 + bid.data.selfQualified = True
637 644 else:
638 645 bid = test_bid_data()
639 646 if 'lots' in tender_data:
... ...
Please register or login to post a comment