Commit 5f73393300179bc1ceff7fab11e923b4d645554a
1 parent
3d009e0a
Make test_confirm_data
Update other functions to work with Munch Delete test_change_cancellation_document_field_data
Showing
3 changed files
with
175 additions
and
13 deletions
... | ... | @@ -355,7 +355,7 @@ Library openprocurement_client_helper.py |
355 | 355 | ... [Return] Nothing |
356 | 356 | [Arguments] ${username} ${tender_uaid} ${award_num} |
357 | 357 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
358 | - ${data}= confirm_supplier ${tender['data']['awards'][${award_num}]['id']} | |
358 | + ${data}= test_confirm_data ${tender['data']['awards'][${award_num}]['id']} | |
359 | 359 | Log ${data} |
360 | 360 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_award ${tender} ${data} |
361 | 361 | Log ${reply} |
... | ... | @@ -397,7 +397,8 @@ Library openprocurement_client_helper.py |
397 | 397 | ... [Return] Nothing |
398 | 398 | [Arguments] ${username} ${tender_uaid} ${cancel_num} ${doc_num} ${field} ${value} |
399 | 399 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
400 | - ${data}= test_change_cancellation_document_field_data ${field} ${value} | |
400 | + ${temp}= Create Dictionary ${field} ${value} | |
401 | + ${data}= Create Dictionary data ${temp} | |
401 | 402 | Log ${data} |
402 | 403 | ${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']} |
403 | 404 | Log ${reply} |
... | ... | @@ -424,7 +425,7 @@ Library openprocurement_client_helper.py |
424 | 425 | ... [Return] Nothing |
425 | 426 | [Arguments] ${username} ${tender_uaid} ${cancel_num} |
426 | 427 | ${tender}= Пошук тендера по ідентифікатору ${username} ${tender_uaid} |
427 | - ${data}= confirm_cancellation ${tender['data']['cancellations'][${cancel_num}]['id']} | |
428 | + ${data}= test_confirm_data ${tender['data']['cancellations'][${cancel_num}]['id']} | |
428 | 429 | Log ${data} |
429 | 430 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_cancellation ${tender} ${data} |
430 | 431 | Log ${reply} |
... | ... | @@ -437,7 +438,7 @@ Library openprocurement_client_helper.py |
437 | 438 | ... [Return] Nothing |
438 | 439 | [Arguments] ${username} ${tender_uaid} ${contract_num} |
439 | 440 | ${tender}= Викликати для учасника ${username} Пошук тендера по ідентифікатору ${tender_uaid} |
440 | - ${data}= confirm_contract ${tender['data']['contracts'][${contract_num}]['id']} | |
441 | + ${data}= test_confirm_data ${tender['data']['contracts'][${contract_num}]['id']} | |
441 | 442 | Log ${data} |
442 | 443 | ${reply}= Call Method ${USERS.users['${username}'].client} patch_contract ${tender} ${data} |
443 | 444 | Log ${reply} | ... | ... |
... | ... | @@ -504,6 +504,142 @@ def test_complaint_data(): |
504 | 504 | }) |
505 | 505 | |
506 | 506 | |
507 | +def test_claim_data(): | |
508 | + return munchify({ | |
509 | + "data": { | |
510 | + "author": { | |
511 | + "address": { | |
512 | + "countryName": u"Україна", | |
513 | + "countryName_ru": u"Украина", | |
514 | + "countryName_en": "Ukraine", | |
515 | + "locality": u"м. Вінниця", | |
516 | + "postalCode": "21100", | |
517 | + "region": u"Вінницька область", | |
518 | + "streetAddress": fake.street_address() | |
519 | + }, | |
520 | + "contactPoint": { | |
521 | + "name": fake.name(), | |
522 | + "telephone": fake.phone_number() | |
523 | + }, | |
524 | + "identifier": { | |
525 | + "scheme": u"UA-EDR", | |
526 | + "id": u"{:08d}".format(fake.pyint()), | |
527 | + "uri": fake.image_url(width=None, height=None) | |
528 | + }, | |
529 | + "name": fake.company() | |
530 | + }, | |
531 | + "description": fake.sentence(nb_words=10, variable_nb_words=True), | |
532 | + "title": fake.sentence(nb_words=6, variable_nb_words=True) | |
533 | + } | |
534 | + }) | |
535 | + | |
536 | + | |
537 | +def test_complaint_answer_data(complaint_id): | |
538 | + return munchify({ | |
539 | + "data": { | |
540 | + "id": complaint_id, | |
541 | + "status": "answered", | |
542 | + "resolutionType": "resolved", | |
543 | + "resolution": fake.sentence(nb_words=40, variable_nb_words=True) | |
544 | + } | |
545 | + }) | |
546 | + | |
547 | + | |
548 | +def test_claim_answer_satisfying_data(claim_id): | |
549 | + return munchify({ | |
550 | + "data": { | |
551 | + "id": claim_id, | |
552 | + "status": "resolved", | |
553 | + "satisfied": True | |
554 | + } | |
555 | + }) | |
556 | + | |
557 | + | |
558 | +def test_claim_answer_data(claim_id): | |
559 | + return munchify({ | |
560 | + "data": { | |
561 | + "status": "answered", | |
562 | + "resolutionType": "resolved", | |
563 | + "tendererAction": fake.sentence(nb_words=10, variable_nb_words=True), | |
564 | + "resolution": fake.sentence(nb_words=15, variable_nb_words=True), | |
565 | + "id": claim_id | |
566 | + } | |
567 | + }) | |
568 | + | |
569 | + | |
570 | +def test_escalate_claim_data(claim_id): | |
571 | + return munchify({ | |
572 | + "data": { | |
573 | + "status": "pending", | |
574 | + "satisfied": False, | |
575 | + "id": claim_id | |
576 | + } | |
577 | + }) | |
578 | + | |
579 | + | |
580 | +def test_cancel_tender_data(cancellation_reason): | |
581 | + return munchify({ | |
582 | + 'data': { | |
583 | + 'reason': cancellation_reason | |
584 | + } | |
585 | + }) | |
586 | + | |
587 | + | |
588 | +def test_cancel_claim_data(claim_id, cancellation_reason): | |
589 | + return munchify({ | |
590 | + 'data': { | |
591 | + 'cancellationReason': cancellation_reason, | |
592 | + 'status': 'cancelled', | |
593 | + 'id': claim_id | |
594 | + } | |
595 | + }) | |
596 | + | |
597 | + | |
598 | +def test_change_cancellation_document_field_data(key, value): | |
599 | + return munchify({ | |
600 | + "data": { | |
601 | + key: value | |
602 | + } | |
603 | + }) | |
604 | + | |
605 | + | |
606 | + | |
607 | +def test_confirm_data(ID): | |
608 | + return munchify({ | |
609 | + "data": { | |
610 | + "status": "active", | |
611 | + "id": ID | |
612 | + } | |
613 | + }) | |
614 | + | |
615 | + | |
616 | +def test_submit_claim_data(claim_id): | |
617 | + return munchify({ | |
618 | + "data": { | |
619 | + "id": claim_id, | |
620 | + "status": "claim" | |
621 | + } | |
622 | + }) | |
623 | + | |
624 | + | |
625 | +def test_additional_items_data(tender_id, access_token): | |
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 | + }) | |
641 | + | |
642 | + | |
507 | 643 | def test_complaint_reply_data(): |
508 | 644 | return munchify({ |
509 | 645 | "data": { |
... | ... | @@ -644,7 +780,7 @@ def auction_bid(): |
644 | 780 | |
645 | 781 | |
646 | 782 | def test_supplier_data(): |
647 | - return { | |
783 | + return munchify({ | |
648 | 784 | "data": { |
649 | 785 | "suppliers": [ |
650 | 786 | { |
... | ... | @@ -675,7 +811,7 @@ def test_supplier_data(): |
675 | 811 | "valueAddedTaxIncluded": True |
676 | 812 | } |
677 | 813 | } |
678 | - } | |
814 | + }) | |
679 | 815 | |
680 | 816 | |
681 | 817 | def test_award_data(): | ... | ... |
... | ... | @@ -14,13 +14,38 @@ from robot.output.loggerhelper import Message |
14 | 14 | # can access them by simply importing library "service_keywords". |
15 | 15 | # Please ignore the warning given by Flake8 or other linter. |
16 | 16 | from .initial_data import ( |
17 | - auction_bid, create_fake_doc, test_award_data, test_bid_data, | |
18 | - test_bid_data_meat_tender, test_complaint_data, test_complaint_reply_data, | |
19 | - test_invalid_features_data, test_item_data, test_lot_complaint_data, | |
20 | - test_lot_data, test_lot_document_data, test_lot_question_data, | |
21 | - test_lots_bid_data, test_meat_tender_data, test_question_answer_data, | |
22 | - test_question_data, test_supplier_data, test_tender_data, | |
23 | - test_tender_data_limited, test_tender_data_multiple_items, | |
17 | + auction_bid, | |
18 | + create_fake_doc, | |
19 | + test_additional_items_data, | |
20 | + test_award_data, | |
21 | + test_bid_data, | |
22 | + test_bid_data_meat_tender, | |
23 | + test_cancel_claim_data, | |
24 | + test_cancel_tender_data, | |
25 | + test_change_cancellation_document_field_data, | |
26 | + test_claim_answer_data, | |
27 | + test_claim_data, | |
28 | + test_confirm_data, | |
29 | + test_claim_answer_satisfying_data, | |
30 | + test_complaint_answer_data, | |
31 | + test_complaint_data, | |
32 | + test_complaint_reply_data, | |
33 | + test_escalate_claim_data, | |
34 | + test_invalid_features_data, | |
35 | + test_item_data, | |
36 | + test_lot_complaint_data, | |
37 | + test_lot_data, | |
38 | + test_lot_document_data, | |
39 | + test_lot_question_data, | |
40 | + test_lots_bid_data, | |
41 | + test_meat_tender_data, | |
42 | + test_question_answer_data, | |
43 | + test_question_data, | |
44 | + test_submit_claim_data, | |
45 | + test_supplier_data, | |
46 | + test_tender_data, | |
47 | + test_tender_data_limited, | |
48 | + test_tender_data_multiple_items, | |
24 | 49 | test_tender_data_multiple_lots |
25 | 50 | ) |
26 | 51 | from .local_time import get_now, TZ | ... | ... |
Please
register
or
login
to post a comment