Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing - CET-393 Python SDK - Label purchase error #96

Closed
wants to merge 8 commits into from
2 changes: 2 additions & 0 deletions tests/test_create_order.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
from dateutil.parser import isoparse

import shippo
Expand All @@ -7,6 +8,7 @@

class TestCreateOrder:

@pytest.mark.run(order=1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use a pytest.fixture for this instead? Could also use that to clean up the order after as well if that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use fixture instead. I don't see an endpoint to delete an order so how would we go about cleaning the order up after?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there isn't one available now then I guess we just leave them around :)

def test_create_order(self, api: shippo.Shippo):
order = api.orders.create(request=OrderCreateRequest(
placed_at='2016-09-23T01:28:12Z',
Expand Down