refactor: replace decpinfo with colibre in test client identifiers
Update test fixtures and client references to use colibre branding instead of the legacy decpinfo naming convention. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,22 +4,22 @@ from src.subscriptions import client
|
||||
|
||||
|
||||
def test_auth_and_base_url_used(fake_httpx):
|
||||
fake_httpx["queue"].append(fake_httpx["Response"](200, {"handle": "decpinfo-1"}))
|
||||
client.get_customer("decpinfo-1")
|
||||
fake_httpx["queue"].append(fake_httpx["Response"](200, {"handle": "colibre-1"}))
|
||||
client.get_customer("colibre-1")
|
||||
call = fake_httpx["calls"][0]
|
||||
assert call["url"] == "https://api.test/v1/customer/decpinfo-1"
|
||||
assert call["url"] == "https://api.test/v1/customer/colibre-1"
|
||||
assert call["auth"] == ("priv_test", "")
|
||||
|
||||
|
||||
def test_get_customer(fake_httpx):
|
||||
fake_httpx["queue"].append(fake_httpx["Response"](200, {"handle": "decpinfo-1"}))
|
||||
result = client.get_customer("decpinfo-1")
|
||||
assert result == {"handle": "decpinfo-1"}
|
||||
fake_httpx["queue"].append(fake_httpx["Response"](200, {"handle": "colibre-1"}))
|
||||
result = client.get_customer("colibre-1")
|
||||
assert result == {"handle": "colibre-1"}
|
||||
|
||||
|
||||
def test_update_customer(fake_httpx):
|
||||
fake_httpx["queue"].append(fake_httpx["Response"](200, {"handle": "decpinfo-1"}))
|
||||
client.update_customer("decpinfo-1", {"email": "a@b.fr"})
|
||||
fake_httpx["queue"].append(fake_httpx["Response"](200, {"handle": "colibre-1"}))
|
||||
client.update_customer("colibre-1", {"email": "a@b.fr"})
|
||||
call = fake_httpx["calls"][0]
|
||||
assert call["method"] == "PUT"
|
||||
assert call["json"] == {"email": "a@b.fr"}
|
||||
@@ -40,12 +40,12 @@ def test_create_subscription_session_with_customer_handle(fake_httpx):
|
||||
"plan_simple",
|
||||
"https://app/ok",
|
||||
"https://app/ko",
|
||||
customer_handle="decpinfo-1",
|
||||
customer_handle="colibre-1",
|
||||
)
|
||||
assert url == "https://checkout.reepay.com/#/sub-1"
|
||||
body = fake_httpx["calls"][0]["json"]
|
||||
assert body["plan"] == "plan_simple"
|
||||
assert body["customer"] == "decpinfo-1"
|
||||
assert body["customer"] == "colibre-1"
|
||||
assert body["signup_method"] == "link"
|
||||
assert "prepare_subscription" not in body
|
||||
|
||||
@@ -66,7 +66,7 @@ def test_create_subscription_session_no_trial(fake_httpx):
|
||||
"https://app/ok",
|
||||
"https://app/ko",
|
||||
no_trial=True,
|
||||
customer_handle="decpinfo-1",
|
||||
customer_handle="colibre-1",
|
||||
)
|
||||
assert fake_httpx["calls"][0]["json"]["no_trial"] is True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user