Skip to content

Commit

Permalink
Merge pull request #337 from EasyPost/init_examples
Browse files Browse the repository at this point in the history
fix: init examples repo
  • Loading branch information
Justintime50 authored Jul 9, 2024
2 parents 02b474d + 81c2b8b commit 3970032
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ docs:
flake8:
$(VIRTUAL_BIN)/flake8 $(PROJECT_NAME)/ $(TEST_DIR)/ --append-config examples/style_guides/python/.flake8

## init-examples-submodule - Initialize the examples submodule
init-examples-submodule:
git submodule init
git submodule update

## install - Install the project locally
install: | update-examples-submodule
install: | init-examples-submodule
$(PYTHON_BINARY) -m venv $(VIRTUAL_ENV)
$(VIRTUAL_BIN)/pip install -e ."[dev]"

Expand Down
12 changes: 7 additions & 5 deletions tests/test_carrier_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ def test_carrier_account_update_ups(prod_client):

carrier_account = prod_client.carrier_account.create(**params)

prod_client.carrier_account.update(carrier_account.id, account_number="987654321")
updated_carrier_account = prod_client.carrier_account.update(carrier_account.id, account_number="987654321")

assert isinstance(carrier_account, CarrierAccount)
assert str.startswith(carrier_account.id, "ca_")
assert carrier_account.type == "UpsAccount"
assert isinstance(updated_carrier_account, CarrierAccount)
assert str.startswith(updated_carrier_account.id, "ca_")
assert updated_carrier_account.type == "UpsAccount"

prod_client.carrier_account.delete(carrier_account.id) # Delete the carrier account once it's done being tested.
prod_client.carrier_account.delete(
updated_carrier_account.id
) # Delete the carrier account once it's done being tested.

0 comments on commit 3970032

Please sign in to comment.