Commit 3d6bcc2cd7db337fc893d125023e4349b1eaca7e

Authored by ivanka12
1 parent 9571d975

add method create_fake_IsoDurationType

@@ -113,6 +113,15 @@ def create_fake_doc(): @@ -113,6 +113,15 @@ def create_fake_doc():
113 return tf.name.replace('\\', '\\\\'), os.path.basename(tf.name), content 113 return tf.name.replace('\\', '\\\\'), os.path.basename(tf.name), content
114 114
115 115
  116 +def create_fake_IsoDurationType(
  117 + years=0, months=0, days=0,
  118 + hours=0, minutes=0, seconds=0):
  119 + return u"P{}Y{}M{}DT{}H{}M{}S".format(
  120 + years, months, days,
  121 + hours, minutes, seconds
  122 + )
  123 +
  124 +
116 def test_tender_data(params, 125 def test_tender_data(params,
117 periods=("enquiry", "tender"), 126 periods=("enquiry", "tender"),
118 submissionMethodDetails=None, 127 submissionMethodDetails=None,
@@ -595,7 +604,14 @@ def test_tender_data_framework_agreement(params, submissionMethodDetails): @@ -595,7 +604,14 @@ def test_tender_data_framework_agreement(params, submissionMethodDetails):
595 data = test_tender_data_openeu(params, submissionMethodDetails) 604 data = test_tender_data_openeu(params, submissionMethodDetails)
596 data['procurementMethodType'] = 'closeFrameworkAgreementUA' 605 data['procurementMethodType'] = 'closeFrameworkAgreementUA'
597 data['maxAwardsCount'] = fake.random_int(min=3, max=5) 606 data['maxAwardsCount'] = fake.random_int(min=3, max=5)
598 - data['agreementDuration'] = 'P1M' 607 + data['agreementDuration'] = create_fake_IsoDurationType(
  608 + years=fake.random_int(min=1, max=3),
  609 + months=fake.random_int(min=1, max=8),
  610 + days=fake.random_int(min=1, max=6),
  611 + hours=fake.random_int(min=1, max=20),
  612 + minutes=fake.random_int(min=1, max=50),
  613 + seconds=fake.random_int(min=1, max=60)
  614 + )
599 return data 615 return data
600 616
601 617
Please register or login to post a comment