From 4990ae1f1124889c735d107e8db9338ccc8278a8 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Mon, 1 May 2023 12:29:21 -0600 Subject: [PATCH] fix: planned_ship_date fixture --- tests/conftest.py | 5 +++++ tests/test_shipment.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index ae9a11d6..fcd7f991 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -347,3 +347,8 @@ def credit_card_details(): @pytest.fixture def rma_form_options(): return read_fixture_data()["form_options"]["rma"] + + +@pytest.fixture +def planned_ship_date(): + return "2023-04-28" diff --git a/tests/test_shipment.py b/tests/test_shipment.py index 2c9792d6..d47bbe58 100644 --- a/tests/test_shipment.py +++ b/tests/test_shipment.py @@ -308,10 +308,10 @@ def test_shipment_buy_with_end_shipper_id(ca_address_1, basic_shipment): @pytest.mark.vcr() -def test_retrieve_estimated_delivery_date(basic_shipment): +def test_retrieve_estimated_delivery_date(basic_shipment, planned_ship_date): """Tests that we retrieve time-in-transit data for each of the Rates of a Shipment.""" shipment = easypost.Shipment.create(**basic_shipment) - rates = shipment.retrieve_estimated_delivery_date(planned_ship_date="2023-04-28") + rates = shipment.retrieve_estimated_delivery_date(planned_ship_date=planned_ship_date) assert all(entry.get("easypost_time_in_transit_data") for entry in rates)