Commit 54ab1293bc906bb78256ffdd6cbb623b1a2bceed
1 parent
0149ee2a
Generate test data for openua_defense procedure
Showing
2 changed files
with
21 additions
and
1 deletions
@@ -466,6 +466,16 @@ def test_tender_data_openua(params, submissionMethodDetails): | @@ -466,6 +466,16 @@ def test_tender_data_openua(params, submissionMethodDetails): | ||
466 | return data | 466 | return data |
467 | 467 | ||
468 | 468 | ||
469 | +def test_tender_data_openua_defense(params, submissionMethodDetails): | ||
470 | + """We should not provide any values for `enquiryPeriod` when creating | ||
471 | + an openUA, openEU or openUA_defense procedure. That field should not be present at all. | ||
472 | + Therefore, we pass a nondefault list of periods to `test_tender_data()`.""" | ||
473 | + data = test_tender_data(params, ('tender',), submissionMethodDetails) | ||
474 | + data['procurementMethodType'] = 'aboveThresholdUA.defense' | ||
475 | + data['procuringEntity']['kind'] = 'defense' | ||
476 | + return data | ||
477 | + | ||
478 | + | ||
469 | def test_tender_data_openeu(params, submissionMethodDetails): | 479 | def test_tender_data_openeu(params, submissionMethodDetails): |
470 | # We should not provide any values for `enquiryPeriod` when creating | 480 | # We should not provide any values for `enquiryPeriod` when creating |
471 | # an openUA or openEU procedure. That field should not be present at all. | 481 | # an openUA or openEU procedure. That field should not be present at all. |
@@ -47,6 +47,7 @@ from .initial_data import ( | @@ -47,6 +47,7 @@ from .initial_data import ( | ||
47 | test_tender_data_openeu, | 47 | test_tender_data_openeu, |
48 | test_tender_data_openua, | 48 | test_tender_data_openua, |
49 | test_tender_data_planning, | 49 | test_tender_data_planning, |
50 | + test_tender_data_openua_defense, | ||
50 | create_fake_title, | 51 | create_fake_title, |
51 | create_fake_value_amount, | 52 | create_fake_value_amount, |
52 | test_change_document_data, | 53 | test_change_document_data, |
@@ -315,6 +316,9 @@ def prepare_test_tender_data(procedure_intervals, | @@ -315,6 +316,9 @@ def prepare_test_tender_data(procedure_intervals, | ||
315 | elif mode == 'openua': | 316 | elif mode == 'openua': |
316 | return munchify({'data': test_tender_data_openua( | 317 | return munchify({'data': test_tender_data_openua( |
317 | tender_parameters, submissionMethodDetails)}) | 318 | tender_parameters, submissionMethodDetails)}) |
319 | + elif mode == 'openua_defense': | ||
320 | + return munchify({'data': test_tender_data_openua_defense( | ||
321 | + tender_parameters, submissionMethodDetails)}) | ||
318 | elif mode == 'open_competitive_dialogue': | 322 | elif mode == 'open_competitive_dialogue': |
319 | return munchify({'data': test_tender_data_competitive_dialogue( | 323 | return munchify({'data': test_tender_data_competitive_dialogue( |
320 | tender_parameters, submissionMethodDetails)}) | 324 | tender_parameters, submissionMethodDetails)}) |
@@ -511,7 +515,13 @@ def get_object_by_id(data, given_object_id, slice_element, object_id): | @@ -511,7 +515,13 @@ def get_object_by_id(data, given_object_id, slice_element, object_id): | ||
511 | 515 | ||
512 | def generate_test_bid_data(tender_data): | 516 | def generate_test_bid_data(tender_data): |
513 | bid = test_bid_data() | 517 | bid = test_bid_data() |
514 | - if tender_data.get('procurementMethodType', '')[:-2] in ('aboveThreshold', 'competitiveDialogue'): | 518 | + if tender_data.get('procurementMethodType', '') in ( |
519 | + 'aboveThresholdUA', | ||
520 | + 'aboveThresholdUA.defense', | ||
521 | + 'aboveThresholdEU', | ||
522 | + 'competitiveDialogueUA' | ||
523 | + 'competitiveDialogueEU' | ||
524 | + ): | ||
515 | bid.data.selfEligible = True | 525 | bid.data.selfEligible = True |
516 | bid.data.selfQualified = True | 526 | bid.data.selfQualified = True |
517 | if 'lots' in tender_data: | 527 | if 'lots' in tender_data: |
Please
register
or
login
to post a comment