Commit 561c4d651b7bc4622e563b587e48397140ac4d3f
1 parent
c7c00a2a
Make test_confirm_data
Update other functions to work with Munch Delete test_change_cancellation_document_field_data
Showing
3 changed files
with
44 additions
and
51 deletions
| @@ -397,7 +397,7 @@ Library openprocurement_client_helper.py | @@ -397,7 +397,7 @@ Library openprocurement_client_helper.py | ||
| 397 | ... [Return] Nothing | 397 | ... [Return] Nothing |
| 398 | [Arguments] ${username} ${tender_uaid} ${award_num} | 398 | [Arguments] ${username} ${tender_uaid} ${award_num} |
| 399 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 399 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
| 400 | - ${data}= test_confirm_supplier_data ${tender['data']['awards'][${award_num}]['id']} | 400 | + ${data}= test_confirm_data ${tender['data']['awards'][${award_num}]['id']} |
| 401 | Log ${data} | 401 | Log ${data} |
| 402 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_award ${tender} ${data} | 402 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_award ${tender} ${data} |
| 403 | Log ${reply} | 403 | Log ${reply} |
| @@ -439,7 +439,8 @@ Library openprocurement_client_helper.py | @@ -439,7 +439,8 @@ Library openprocurement_client_helper.py | ||
| 439 | ... [Return] Nothing | 439 | ... [Return] Nothing |
| 440 | [Arguments] ${username} ${tender_uaid} ${cancel_num} ${doc_num} ${field} ${value} | 440 | [Arguments] ${username} ${tender_uaid} ${cancel_num} ${doc_num} ${field} ${value} |
| 441 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 441 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
| 442 | - ${data}= test_change_cancellation_document_field_data ${field} ${value} | 442 | + ${temp}= Create Dictionary ${field} ${value} |
| 443 | + ${data}= Create Dictionary data ${temp} | ||
| 443 | Log ${data} | 444 | Log ${data} |
| 444 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation_document ${tender} ${data} ${tender['data']['cancellations'][${cancel_num}]['id']} ${tender['data']['cancellations'][${cancel_num}]['documents'][${doc_num}]['id']} | 445 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation_document ${tender} ${data} ${tender['data']['cancellations'][${cancel_num}]['id']} ${tender['data']['cancellations'][${cancel_num}]['documents'][${doc_num}]['id']} |
| 445 | Log ${reply} | 446 | Log ${reply} |
| @@ -466,7 +467,7 @@ Library openprocurement_client_helper.py | @@ -466,7 +467,7 @@ Library openprocurement_client_helper.py | ||
| 466 | ... [Return] Nothing | 467 | ... [Return] Nothing |
| 467 | [Arguments] ${username} ${tender_uaid} ${cancel_num} | 468 | [Arguments] ${username} ${tender_uaid} ${cancel_num} |
| 468 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} | 469 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
| 469 | - ${data}= test_confirm_cancellation_data ${tender['data']['cancellations'][${cancel_num}]['id']} | 470 | + ${data}= test_confirm_data ${tender['data']['cancellations'][${cancel_num}]['id']} |
| 470 | Log ${data} | 471 | Log ${data} |
| 471 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation ${tender} ${data} | 472 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation ${tender} ${data} |
| 472 | Log ${reply} | 473 | Log ${reply} |
| @@ -479,7 +480,7 @@ Library openprocurement_client_helper.py | @@ -479,7 +480,7 @@ Library openprocurement_client_helper.py | ||
| 479 | ... [Return] Nothing | 480 | ... [Return] Nothing |
| 480 | [Arguments] ${username} ${tender_uaid} ${contract_num} | 481 | [Arguments] ${username} ${tender_uaid} ${contract_num} |
| 481 | ${tender}= Викликати для учасника ${username} Пошук тендера по ідентифікатору ${tender_uaid} | 482 | ${tender}= Викликати для учасника ${username} Пошук тендера по ідентифікатору ${tender_uaid} |
| 482 | - ${data}= test_confirm_contract_data ${tender['data']['contracts'][${contract_num}]['id']} | 483 | + ${data}= test_confirm_data ${tender['data']['contracts'][${contract_num}]['id']} |
| 483 | Log ${data} | 484 | Log ${data} |
| 484 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data} | 485 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data} |
| 485 | Log ${reply} | 486 | Log ${reply} |
| @@ -535,28 +535,28 @@ def test_claim_data(): | @@ -535,28 +535,28 @@ def test_claim_data(): | ||
| 535 | 535 | ||
| 536 | 536 | ||
| 537 | def test_complaint_answer_data(complaint_id): | 537 | def test_complaint_answer_data(complaint_id): |
| 538 | - return { | 538 | + return munchify({ |
| 539 | "data": { | 539 | "data": { |
| 540 | "id": complaint_id, | 540 | "id": complaint_id, |
| 541 | "status": "answered", | 541 | "status": "answered", |
| 542 | "resolutionType": "resolved", | 542 | "resolutionType": "resolved", |
| 543 | "resolution": fake.sentence(nb_words=40, variable_nb_words=True) | 543 | "resolution": fake.sentence(nb_words=40, variable_nb_words=True) |
| 544 | } | 544 | } |
| 545 | - } | 545 | + }) |
| 546 | 546 | ||
| 547 | 547 | ||
| 548 | def test_claim_answer_satisfying_data(claim_id): | 548 | def test_claim_answer_satisfying_data(claim_id): |
| 549 | - return { | 549 | + return munchify({ |
| 550 | "data": { | 550 | "data": { |
| 551 | "id": claim_id, | 551 | "id": claim_id, |
| 552 | "status": "resolved", | 552 | "status": "resolved", |
| 553 | "satisfied": True | 553 | "satisfied": True |
| 554 | } | 554 | } |
| 555 | - } | 555 | + }) |
| 556 | 556 | ||
| 557 | 557 | ||
| 558 | def test_claim_answer_data(claim_id): | 558 | def test_claim_answer_data(claim_id): |
| 559 | - return { | 559 | + return munchify({ |
| 560 | "data": { | 560 | "data": { |
| 561 | "status": "answered", | 561 | "status": "answered", |
| 562 | "resolutionType": "resolved", | 562 | "resolutionType": "resolved", |
| @@ -564,86 +564,80 @@ def test_claim_answer_data(claim_id): | @@ -564,86 +564,80 @@ def test_claim_answer_data(claim_id): | ||
| 564 | "resolution": fake.sentence(nb_words=15, variable_nb_words=True), | 564 | "resolution": fake.sentence(nb_words=15, variable_nb_words=True), |
| 565 | "id": claim_id | 565 | "id": claim_id |
| 566 | } | 566 | } |
| 567 | - } | 567 | + }) |
| 568 | + | ||
| 568 | 569 | ||
| 569 | def test_escalate_claim_data(claim_id): | 570 | def test_escalate_claim_data(claim_id): |
| 570 | - return { | 571 | + return munchify({ |
| 571 | "data": { | 572 | "data": { |
| 572 | "status": "pending", | 573 | "status": "pending", |
| 573 | "satisfied": False, | 574 | "satisfied": False, |
| 574 | "id": claim_id | 575 | "id": claim_id |
| 575 | } | 576 | } |
| 576 | - } | 577 | + }) |
| 577 | 578 | ||
| 578 | 579 | ||
| 579 | def test_cancel_tender_data(cancellation_reason): | 580 | def test_cancel_tender_data(cancellation_reason): |
| 580 | - return { | 581 | + return munchify({ |
| 581 | 'data': { | 582 | 'data': { |
| 582 | 'reason': cancellation_reason | 583 | 'reason': cancellation_reason |
| 583 | } | 584 | } |
| 584 | - } | 585 | + }) |
| 585 | 586 | ||
| 586 | 587 | ||
| 587 | def test_cancel_claim_data(claim_id, cancellation_reason): | 588 | def test_cancel_claim_data(claim_id, cancellation_reason): |
| 588 | - return { | 589 | + return munchify({ |
| 589 | 'data': { | 590 | 'data': { |
| 590 | 'cancellationReason': cancellation_reason, | 591 | 'cancellationReason': cancellation_reason, |
| 591 | 'status': 'cancelled', | 592 | 'status': 'cancelled', |
| 592 | 'id': claim_id | 593 | 'id': claim_id |
| 593 | } | 594 | } |
| 594 | - } | 595 | + }) |
| 595 | 596 | ||
| 596 | 597 | ||
| 597 | def test_change_cancellation_document_field_data(key, value): | 598 | def test_change_cancellation_document_field_data(key, value): |
| 598 | - data = { | 599 | + return munchify({ |
| 599 | "data": { | 600 | "data": { |
| 600 | key: value | 601 | key: value |
| 601 | } | 602 | } |
| 602 | - } | ||
| 603 | - return data | ||
| 604 | - | 603 | + }) |
| 605 | 604 | ||
| 606 | -def test_confirm_supplier_data(supplier_id): | ||
| 607 | - return { | ||
| 608 | - "data": { | ||
| 609 | - "status": "active", | ||
| 610 | - "id": supplier_id | ||
| 611 | - } | ||
| 612 | - } | ||
| 613 | 605 | ||
| 614 | 606 | ||
| 615 | -def test_confirm_cancellation_data(cancellation_id): | ||
| 616 | - data = { | 607 | +def test_confirm_data(ID): |
| 608 | + return munchify({ | ||
| 617 | "data": { | 609 | "data": { |
| 618 | "status": "active", | 610 | "status": "active", |
| 619 | - "id": cancellation_id | 611 | + "id": ID |
| 620 | } | 612 | } |
| 621 | - } | ||
| 622 | - return data | ||
| 623 | - | ||
| 624 | - | ||
| 625 | -def test_confirm_contract_data(contract_id): | ||
| 626 | - data = { | ||
| 627 | - "data": { | ||
| 628 | - "id": contract_id, | ||
| 629 | - "status": "active" | ||
| 630 | - } | ||
| 631 | - } | ||
| 632 | - return data | 613 | + }) |
| 633 | 614 | ||
| 634 | 615 | ||
| 635 | def test_submit_claim_data(claim_id): | 616 | def test_submit_claim_data(claim_id): |
| 636 | - return { | 617 | + return munchify({ |
| 637 | "data": { | 618 | "data": { |
| 638 | "id": claim_id, | 619 | "id": claim_id, |
| 639 | "status": "claim" | 620 | "status": "claim" |
| 640 | } | 621 | } |
| 641 | - } | 622 | + }) |
| 642 | 623 | ||
| 643 | 624 | ||
| 644 | def test_additional_items_data(tender_id, access_token): | 625 | def test_additional_items_data(tender_id, access_token): |
| 645 | - data = {"access": {"token": access_token}, "data": {"id": tender_id, "items": [{"unit": {"code": "MON", "name": "month"}, "quantity": 9}]}} | ||
| 646 | - return data | 626 | + return munchify({ |
| 627 | + "access": { | ||
| 628 | + "token": access_token | ||
| 629 | + }, | ||
| 630 | + "data": { | ||
| 631 | + "id": tender_id, | ||
| 632 | + "items": [{ | ||
| 633 | + "unit": { | ||
| 634 | + "code": "MON", | ||
| 635 | + "name": "month" | ||
| 636 | + }, | ||
| 637 | + "quantity": 9 | ||
| 638 | + }] | ||
| 639 | + } | ||
| 640 | + }) | ||
| 647 | 641 | ||
| 648 | 642 | ||
| 649 | def test_complaint_reply_data(): | 643 | def test_complaint_reply_data(): |
| @@ -786,7 +780,7 @@ def auction_bid(): | @@ -786,7 +780,7 @@ def auction_bid(): | ||
| 786 | 780 | ||
| 787 | 781 | ||
| 788 | def test_supplier_data(): | 782 | def test_supplier_data(): |
| 789 | - return { | 783 | + return munchify({ |
| 790 | "data": { | 784 | "data": { |
| 791 | "suppliers": [ | 785 | "suppliers": [ |
| 792 | { | 786 | { |
| @@ -817,7 +811,7 @@ def test_supplier_data(): | @@ -817,7 +811,7 @@ def test_supplier_data(): | ||
| 817 | "valueAddedTaxIncluded": True | 811 | "valueAddedTaxIncluded": True |
| 818 | } | 812 | } |
| 819 | } | 813 | } |
| 820 | - } | 814 | + }) |
| 821 | 815 | ||
| 822 | 816 | ||
| 823 | def test_award_data(): | 817 | def test_award_data(): |
| @@ -25,9 +25,7 @@ from .initial_data import ( | @@ -25,9 +25,7 @@ from .initial_data import ( | ||
| 25 | test_change_cancellation_document_field_data, | 25 | test_change_cancellation_document_field_data, |
| 26 | test_claim_answer_data, | 26 | test_claim_answer_data, |
| 27 | test_claim_data, | 27 | test_claim_data, |
| 28 | - test_confirm_cancellation_data, | ||
| 29 | - test_confirm_contract_data, | ||
| 30 | - test_confirm_supplier_data, | 28 | + test_confirm_data, |
| 31 | test_claim_answer_satisfying_data, | 29 | test_claim_answer_satisfying_data, |
| 32 | test_complaint_answer_data, | 30 | test_complaint_answer_data, |
| 33 | test_complaint_data, | 31 | test_complaint_data, |
Please
register
or
login
to post a comment