Skip to content

Commit 657c801

Browse files
committed
fix: rename env var that got missed
1 parent 29a105f commit 657c801

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/test_beta_referral.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import easypost
77

88

9-
REFERRAL_USER_PROD_API_KEY = os.getenv("REFERRAL_USER_PROD_API_KEY", "123")
9+
REFERRAL_CUSTOMER_PROD_API_KEY = os.getenv("REFERRAL_CUSTOMER_PROD_API_KEY", "123")
1010

1111

1212
@pytest.mark.vcr()
@@ -59,10 +59,10 @@ def test_beta_referral_user_all(partner_prod_api_key, page_size):
5959
)
6060
def test_beta_referral_add_credit_card(partner_prod_api_key, credit_card_details):
6161
"""This test requires a partner user's production API key via PARTNER_USER_PROD_API_KEY
62-
as well as one of that user's referral's production API keys via REFERRAL_USER_PROD_API_KEY.
62+
as well as one of that user's referral's production API keys via REFERRAL_CUSTOMER_PROD_API_KEY.
6363
"""
6464
added_credit_card = easypost.beta.Referral.add_credit_card(
65-
referral_api_key=REFERRAL_USER_PROD_API_KEY,
65+
referral_api_key=REFERRAL_CUSTOMER_PROD_API_KEY,
6666
number=credit_card_details["number"],
6767
expiration_month=credit_card_details["expiration_month"],
6868
expiration_year=credit_card_details["expiration_year"],
@@ -77,11 +77,11 @@ def test_beta_referral_add_credit_card(partner_prod_api_key, credit_card_details
7777
@patch("easypost.beta.referral.Referral._create_stripe_token", side_effect=Exception())
7878
def test_beta_referral_add_credit_card_error(mock_stripe_token, mock_easypost_key, credit_card_details):
7979
"""This test requires a partner user's production API key via PARTNER_USER_PROD_API_KEY
80-
as well as one of that user's referral's production API keys via REFERRAL_USER_PROD_API_KEY.
80+
as well as one of that user's referral's production API keys via REFERRAL_CUSTOMER_PROD_API_KEY.
8181
"""
8282
with pytest.raises(Exception) as error:
8383
_ = easypost.beta.Referral.add_credit_card(
84-
referral_api_key=REFERRAL_USER_PROD_API_KEY,
84+
referral_api_key=REFERRAL_CUSTOMER_PROD_API_KEY,
8585
number=credit_card_details["number"],
8686
expiration_month=credit_card_details["expiration_month"],
8787
expiration_year=credit_card_details["expiration_year"],

tests/test_referral.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import easypost
77

88

9-
REFERRAL_USER_PROD_API_KEY = os.getenv("REFERRAL_USER_PROD_API_KEY", "123")
9+
REFERRAL_CUSTOMER_PROD_API_KEY = os.getenv("REFERRAL_CUSTOMER_PROD_API_KEY", "123")
1010

1111

1212
# TODO: Rename this file to `test_referral_customer.py` and all test names need `customer` added to them
@@ -60,10 +60,10 @@ def test_referral_user_all(partner_prod_api_key, page_size):
6060
)
6161
def test_referral_add_credit_card(partner_prod_api_key, credit_card_details):
6262
"""This test requires a partner user's production API key via PARTNER_USER_PROD_API_KEY
63-
as well as one of that user's referral's production API keys via REFERRAL_USER_PROD_API_KEY.
63+
as well as one of that user's referral's production API keys via REFERRAL_CUSTOMER_PROD_API_KEY.
6464
"""
6565
added_credit_card = easypost.Referral.add_credit_card(
66-
referral_api_key=REFERRAL_USER_PROD_API_KEY,
66+
referral_api_key=REFERRAL_CUSTOMER_PROD_API_KEY,
6767
number=credit_card_details["number"],
6868
expiration_month=credit_card_details["expiration_month"],
6969
expiration_year=credit_card_details["expiration_year"],
@@ -78,11 +78,11 @@ def test_referral_add_credit_card(partner_prod_api_key, credit_card_details):
7878
@patch("easypost.referral.Referral._create_stripe_token", side_effect=Exception())
7979
def test_referral_add_credit_card_error(mock_stripe_token, mock_easypost_key, credit_card_details):
8080
"""This test requires a partner user's production API key via PARTNER_USER_PROD_API_KEY
81-
as well as one of that user's referral's production API keys via REFERRAL_USER_PROD_API_KEY.
81+
as well as one of that user's referral's production API keys via REFERRAL_CUSTOMER_PROD_API_KEY.
8282
"""
8383
with pytest.raises(Exception) as error:
8484
_ = easypost.Referral.add_credit_card(
85-
referral_api_key=REFERRAL_USER_PROD_API_KEY,
85+
referral_api_key=REFERRAL_CUSTOMER_PROD_API_KEY,
8686
number=credit_card_details["number"],
8787
expiration_month=credit_card_details["expiration_month"],
8888
expiration_year=credit_card_details["expiration_year"],

0 commit comments

Comments
 (0)