Commit ba06e023ed15a95f57a2a02a823f2d102e978e17

Authored by ivanka12
1 parent 153799d6

change generation deliveryDate

@@ -453,10 +453,11 @@ def test_item_data(cpv=None): @@ -453,10 +453,11 @@ def test_item_data(cpv=None):
453 data["description"] = field_with_id("i", data["description"]) 453 data["description"] = field_with_id("i", data["description"])
454 data["description_en"] = field_with_id("i", data["description_en"]) 454 data["description_en"] = field_with_id("i", data["description_en"])
455 data["description_ru"] = field_with_id("i", data["description_ru"]) 455 data["description_ru"] = field_with_id("i", data["description_ru"])
456 - days = fake.random_int(min=1, max=30) 456 + startDate = fake.random_int(min=1, max=30)
  457 + endDate = startDate + fake.random_int(min=1, max=7)
457 data["deliveryDate"] = { 458 data["deliveryDate"] = {
458 - "startDate": (get_now() + timedelta(days=days)).astimezone(TZ).isoformat(),  
459 - "endDate": (get_now() + timedelta(days=days)).astimezone(TZ).isoformat() 459 + "startDate": (get_now() + timedelta(days=startDate)).replace(hour=0, minute=0, second=0, microsecond=0).isoformat(),
  460 + "endDate": (get_now() + timedelta(days=endDate)).replace(hour=0, minute=0, second=0, microsecond=0).isoformat()
460 } 461 }
461 data["deliveryAddress"]["countryName_en"] = translate_country_en(data["deliveryAddress"]["countryName"]) 462 data["deliveryAddress"]["countryName_en"] = translate_country_en(data["deliveryAddress"]["countryName"])
462 data["deliveryAddress"]["countryName_ru"] = translate_country_ru(data["deliveryAddress"]["countryName"]) 463 data["deliveryAddress"]["countryName_ru"] = translate_country_ru(data["deliveryAddress"]["countryName"])
Please register or login to post a comment