Commit 3d6bcc2cd7db337fc893d125023e4349b1eaca7e
1 parent
9571d975
add method create_fake_IsoDurationType
Showing
1 changed file
with
17 additions
and
1 deletions
| ... | ... | @@ -113,6 +113,15 @@ def create_fake_doc(): |
| 113 | 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 | 125 | def test_tender_data(params, |
| 117 | 126 | periods=("enquiry", "tender"), |
| 118 | 127 | submissionMethodDetails=None, |
| ... | ... | @@ -595,7 +604,14 @@ def test_tender_data_framework_agreement(params, submissionMethodDetails): |
| 595 | 604 | data = test_tender_data_openeu(params, submissionMethodDetails) |
| 596 | 605 | data['procurementMethodType'] = 'closeFrameworkAgreementUA' |
| 597 | 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 | 615 | return data |
| 600 | 616 | |
| 601 | 617 | ... | ... |
Please
register
or
login
to post a comment