Commit 3b8b4e3d39b0c1db814b69c81ba0c0e46043c751

Authored by Leits
1 parent 331465db

test_item_data

@@ -121,10 +121,9 @@ Library openprocurement_client_helper.py @@ -121,10 +121,9 @@ Library openprocurement_client_helper.py
121 ${internalid}= Отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]} 121 ${internalid}= Отримати internal id по UAid ${ARGUMENTS[0]} ${ARGUMENTS[1]}
122 Отримати тендер ${ARGUMENTS[0]} ${internalid} 122 Отримати тендер ${ARGUMENTS[0]} ${internalid}
123 @{items}= Get From Object ${TENDER_DATA.data} items 123 @{items}= Get From Object ${TENDER_DATA.data} items
124 - ${item}= get variable value ${items[1]}  
125 - Run Keyword And Continue On Failure Remove From Dictionary ${item} id  
126 Log Many @{items} 124 Log Many @{items}
127 :FOR ${INDEX} IN RANGE ${ARGUMENTS[2]} 125 :FOR ${INDEX} IN RANGE ${ARGUMENTS[2]}
  126 + \ ${item}= test_item_data
128 \ Append To List ${items} ${item} 127 \ Append To List ${items} ${item}
129 Log Many @{items} 128 Log Many @{items}
130 Set_To_Object ${TENDER_DATA.data} items ${items} 129 Set_To_Object ${TENDER_DATA.data} items ${items}
@@ -404,3 +404,47 @@ def auction_bid(): @@ -404,3 +404,47 @@ def auction_bid():
404 404
405 def test_award_data(): 405 def test_award_data():
406 return munchify({'data': {}}) 406 return munchify({'data': {}})
  407 +
  408 +
  409 +def test_item_data():
  410 + now = get_now()
  411 + return {
  412 + "description": fake.catch_phrase(),
  413 + "deliveryDate": {
  414 + "endDate": (now + timedelta(days=5)).isoformat()
  415 + },
  416 + "deliveryLocation": {
  417 + "latitude": 49.8500,
  418 + "longitude": 24.0167
  419 + },
  420 + "deliveryAddress": {
  421 + "countryName": u"Україна",
  422 + "countryName_ru": u"Украина",
  423 + "countryName_en": "Ukraine",
  424 + "postalCode": fake.postalcode(),
  425 + "region": u"м. Київ",
  426 + "locality": u"м. Київ",
  427 + "streetAddress": fake.street_address()
  428 + },
  429 + "classification": {
  430 + "scheme": u"CPV",
  431 + "id": u"44617100-9",
  432 + "description": u"Картонки",
  433 + "description_ru": u"Большие картонные коробки",
  434 + "description_en": u"Cartons"
  435 + },
  436 + "additionalClassifications": [
  437 + {
  438 + "scheme": u"ДКПП",
  439 + "id": u"17.21.1",
  440 + "description": u"Папір і картон гофровані, паперова й картонна тара"
  441 + }
  442 + ],
  443 + "unit": {
  444 + "name": u"кілограм",
  445 + "name_ru": u"килограмм",
  446 + "name_en": "kilogram",
  447 + "code": u"KGM"
  448 + },
  449 + "quantity": fake.pyint()
  450 + }
@@ -16,7 +16,7 @@ from robot.output.loggerhelper import Message @@ -16,7 +16,7 @@ from robot.output.loggerhelper import Message
16 from .initial_data import ( 16 from .initial_data import (
17 auction_bid, create_fake_doc, 17 auction_bid, create_fake_doc,
18 test_award_data, test_bid_data, test_complaint_data, 18 test_award_data, test_bid_data, test_complaint_data,
19 - test_complaint_reply_data, test_question_answer_data, 19 + test_complaint_reply_data, test_item_data, test_question_answer_data,
20 test_question_data, test_tender_data, test_tender_data_multiple_lots 20 test_question_data, test_tender_data, test_tender_data_multiple_lots
21 ) 21 )
22 from .local_time import get_now, TZ 22 from .local_time import get_now, TZ
Please register or login to post a comment