Commit 45554cb7d141b0d3dbd5a98d95b97c9369873c4f

Authored by mykhaly
1 parent bc451dbf

Add methods for singleItemTenderComplaints

Remove 'data' methods from service_keywords to initial_data
@@ -504,6 +504,87 @@ def test_complaint_data(): @@ -504,6 +504,87 @@ def test_complaint_data():
504 }) 504 })
505 505
506 506
  507 +def test_complaint_answer_data(complaint_id):
  508 + return {
  509 + "data": {
  510 + "id": complaint_id,
  511 + "status": "answered",
  512 + "resolutionType": "resolved",
  513 + "resolution": fake.sentence(nb_words=40, variable_nb_words=True)
  514 + }
  515 + }
  516 +
  517 +
  518 +def test_complaint_answer_confirmation_data(complaint_id):
  519 + return {
  520 + "data": {
  521 + "id": complaint_id,
  522 + "status": "resolved",
  523 + "satisfied": True
  524 + }
  525 + }
  526 +
  527 +
  528 +def test_cancel_tender_data(cancellation_reason):
  529 + return {
  530 + 'data': {
  531 + 'reason': cancellation_reason
  532 + }
  533 + }
  534 +
  535 +
  536 +def test_change_cancellation_document_field_data(key, value):
  537 + data = {
  538 + "data": {
  539 + key: value
  540 + }
  541 + }
  542 + return data
  543 +
  544 +
  545 +def test_confirm_supplier_data(supplier_id):
  546 + return {
  547 + "data": {
  548 + "status": "active",
  549 + "id": supplier_id
  550 + }
  551 + }
  552 +
  553 +
  554 +def test_confirm_cancellation_data(cancellation_id):
  555 + data = {
  556 + "data": {
  557 + "status": "active",
  558 + "id": cancellation_id
  559 + }
  560 + }
  561 + return data
  562 +
  563 +
  564 +def test_confirm_contract_data(contract_id):
  565 + data = {
  566 + "data": {
  567 + "id": contract_id,
  568 + "status": "active"
  569 + }
  570 + }
  571 + return data
  572 +
  573 +
  574 +def test_confirm_complaint_data(complaint_id):
  575 + return {
  576 + "data": {
  577 + "id": complaint_id,
  578 + "status": "claim"
  579 + }
  580 + }
  581 +
  582 +
  583 +def test_additional_items_data(tender_id, access_token):
  584 + data = {"access": {"token": access_token}, "data": {"id": tender_id, "items": [{"unit": {"code": "MON", "name": "month"}, "quantity": 9}]}}
  585 + return data
  586 +
  587 +
507 def test_complaint_reply_data(): 588 def test_complaint_reply_data():
508 return munchify({ 589 return munchify({
509 "data": { 590 "data": {
@@ -14,13 +14,36 @@ from robot.output.loggerhelper import Message @@ -14,13 +14,36 @@ from robot.output.loggerhelper import Message
14 # can access them by simply importing library "service_keywords". 14 # can access them by simply importing library "service_keywords".
15 # Please ignore the warning given by Flake8 or other linter. 15 # Please ignore the warning given by Flake8 or other linter.
16 from .initial_data import ( 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_tender_data,
  24 + test_change_cancellation_document_field_data,
  25 + test_confirm_cancellation_data,
  26 + test_confirm_complaint_data,
  27 + test_confirm_contract_data,
  28 + test_confirm_supplier_data,
  29 + test_complaint_answer_confirmation_data,
  30 + test_complaint_answer_data,
  31 + test_complaint_data,
  32 + test_complaint_reply_data,
  33 + test_invalid_features_data,
  34 + test_item_data,
  35 + test_lot_complaint_data,
  36 + test_lot_data,
  37 + test_lot_document_data,
  38 + test_lot_question_data,
  39 + test_lots_bid_data,
  40 + test_meat_tender_data,
  41 + test_question_answer_data,
  42 + test_question_data,
  43 + test_supplier_data,
  44 + test_tender_data,
  45 + test_tender_data_limited,
  46 + test_tender_data_multiple_items,
24 test_tender_data_multiple_lots 47 test_tender_data_multiple_lots
25 ) 48 )
26 from .local_time import get_now, TZ 49 from .local_time import get_now, TZ
@@ -181,58 +204,6 @@ def merge_dicts(left, right): @@ -181,58 +204,6 @@ def merge_dicts(left, right):
181 new.update(right) 204 new.update(right)
182 return new 205 return new
183 206
184 -  
185 -def cancel_tender(cancellation_reason):  
186 - return {  
187 - 'data': {  
188 - 'reason': cancellation_reason  
189 - }  
190 - }  
191 -  
192 -  
193 -def confirm_supplier(supplier_id):  
194 - return {  
195 - "data": {  
196 - "status": "active",  
197 - "id": supplier_id  
198 - }  
199 - }  
200 -  
201 -  
202 -def change_cancellation_document_field(key, value):  
203 - data = {  
204 - "data": {  
205 - key: value  
206 - }  
207 - }  
208 - return data  
209 -  
210 -  
211 -def confirm_cancellation(cancellation_id):  
212 - data = {  
213 - "data": {  
214 - "status": "active",  
215 - "id": cancellation_id  
216 - }  
217 - }  
218 - return data  
219 -  
220 -  
221 -def confirm_contract(contract_id):  
222 - data = {  
223 - "data": {  
224 - "id": contract_id,  
225 - "status": "active"  
226 - }  
227 - }  
228 - return data  
229 -  
230 -  
231 -def additional_items_data(tender_id, access_token):  
232 - data = {"access": {"token": access_token}, "data": {"id": tender_id, "items": [{"unit": {"code": "MON", "name": "month"}, "quantity": 9}]}}  
233 - return data  
234 -  
235 -  
236 def munch_dict(arg=None, data=False): 207 def munch_dict(arg=None, data=False):
237 if arg is None: 208 if arg is None:
238 arg = {} 209 arg = {}
Please register or login to post a comment