6
6
import easypost
7
7
8
8
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" )
10
10
11
11
12
12
# 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):
60
60
)
61
61
def test_referral_add_credit_card (partner_prod_api_key , credit_card_details ):
62
62
"""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 .
64
64
"""
65
65
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 ,
67
67
number = credit_card_details ["number" ],
68
68
expiration_month = credit_card_details ["expiration_month" ],
69
69
expiration_year = credit_card_details ["expiration_year" ],
@@ -78,11 +78,11 @@ def test_referral_add_credit_card(partner_prod_api_key, credit_card_details):
78
78
@patch ("easypost.referral.Referral._create_stripe_token" , side_effect = Exception ())
79
79
def test_referral_add_credit_card_error (mock_stripe_token , mock_easypost_key , credit_card_details ):
80
80
"""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 .
82
82
"""
83
83
with pytest .raises (Exception ) as error :
84
84
_ = easypost .Referral .add_credit_card (
85
- referral_api_key = REFERRAL_USER_PROD_API_KEY ,
85
+ referral_api_key = REFERRAL_CUSTOMER_PROD_API_KEY ,
86
86
number = credit_card_details ["number" ],
87
87
expiration_month = credit_card_details ["expiration_month" ],
88
88
expiration_year = credit_card_details ["expiration_year" ],
0 commit comments