Skip to content

Commit

Permalink
fix: planned_ship_date fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed May 1, 2023
1 parent a10e3e1 commit 4990ae1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions tests/test_shipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 4990ae1

Please sign in to comment.