Showing
1 changed file
with
4 additions
and
3 deletions
... | ... | @@ -453,10 +453,11 @@ def test_item_data(cpv=None): |
453 | 453 | data["description"] = field_with_id("i", data["description"]) |
454 | 454 | data["description_en"] = field_with_id("i", data["description_en"]) |
455 | 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 | 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 | 462 | data["deliveryAddress"]["countryName_en"] = translate_country_en(data["deliveryAddress"]["countryName"]) |
462 | 463 | data["deliveryAddress"]["countryName_ru"] = translate_country_ru(data["deliveryAddress"]["countryName"]) | ... | ... |
Please
register
or
login
to post a comment