Skip to content

Commit 5713755

Browse files
committed
chore(commerce): genericize Martin Estate references in tests
Public-package tests are part of the public surface (visible on the PyPI sdist + GitHub source). The sessions / a2a / ucp / skill_md tests were using "Martin Estate" / "https://agents.martinestate.com" / "martin-estate- wine-commerce" as fixture values; that bakes a public reference customer's domain into the SDK source. Swap to "Example Merchant" / "agents.example.com" / "example-merchant-commerce".
1 parent 13d6cd1 commit 5713755

4 files changed

Lines changed: 32 additions & 32 deletions

File tree

tests/test_a2a.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def _full_result() -> AssessResult:
2626

2727
def test_card_with_identity_when_data_provided():
2828
card = build_a2a_agent_card(
29-
name="Martin Estate",
30-
url="https://agents.martinestate.com",
29+
name="Example Merchant",
30+
url="https://agents.example.com",
3131
data=_full_result(),
3232
)
3333
assert card.protocol_version == "1.0"
3434
assert card.card_version == 1
35-
assert card.name == "Martin Estate"
36-
assert card.url == "https://agents.martinestate.com"
35+
assert card.name == "Example Merchant"
36+
assert card.url == "https://agents.example.com"
3737
assert card.identity is not None
3838
assert card.identity.operator_id == "op_abc"
3939
assert card.identity.kyc_level == "enhanced"

tests/test_sessions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ def test_forwards_context_and_product_name(self):
7272
CreateSessionOnMissing(
7373
api_key="ask_test",
7474
context="purchase_flow",
75-
product_name="Martin Estate",
75+
product_name="Example Merchant",
7676
),
7777
user_agent="agentscore-commerce/1.0",
7878
)
7979
import json
8080

8181
body = json.loads(route.calls[0].request.content)
8282
assert body["context"] == "purchase_flow"
83-
assert body["product_name"] == "Martin Estate"
83+
assert body["product_name"] == "Example Merchant"
8484

8585
@respx.mock
8686
def test_omits_context_and_product_name_when_not_provided(self):

tests/test_skill_md.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@
1616

1717
def _base() -> BuildSkillMdInput:
1818
return BuildSkillMdInput(
19-
name="martin-estate-wine-commerce",
20-
description="Buy wine from Martin Estate via an AI agent",
21-
homepage="https://martin-estate.com",
22-
merchant_name="Martin Estate",
19+
name="example-merchant-commerce",
20+
description="Buy from Example Merchant via an AI agent",
21+
homepage="https://example.com",
22+
merchant_name="Example Merchant",
2323
accepted_rails=["tempo_mpp", "x402_base", "solana_mpp", "stripe"],
2424
endpoints=[
2525
SkillMdEndpoint(method="GET", path="/api/v1/wines", auth_required=False, description="Wine catalog"),
2626
SkillMdEndpoint(method="POST", path="/api/v1/orders", auth_required=True, description="Place order"),
2727
],
28-
triggers=["User wants to buy wine from Martin Estate"],
28+
triggers=["User wants to buy from Example Merchant"],
2929
)
3030

3131

3232
class TestFrontmatter:
3333
def test_emits_yaml_block_with_required_fields(self) -> None:
3434
out = build_skill_md(_base())
3535
assert out.startswith("---\n")
36-
assert "name: martin-estate-wine-commerce" in out
37-
assert 'description: "Buy wine from Martin Estate via an AI agent"' in out
36+
assert "name: example-merchant-commerce" in out
37+
assert 'description: "Buy from Example Merchant via an AI agent"' in out
3838
assert "metadata:" in out
3939
assert ' version: "1"' in out
40-
assert ' homepage: "https://martin-estate.com"' in out
40+
assert ' homepage: "https://example.com"' in out
4141

4242
def test_version_emitted_as_quoted_string(self) -> None:
4343
cfg = _base()
@@ -96,7 +96,7 @@ def test_metadata_extras_with_protected_keys(self) -> None:
9696
assert ' author: "agentscore"' in out
9797
assert ' vendor_id: "me-001"' in out
9898
assert ' version: "1"' in out
99-
assert ' homepage: "https://martin-estate.com"' in out
99+
assert ' homepage: "https://example.com"' in out
100100
assert "IGNORED" not in out
101101

102102

@@ -159,49 +159,49 @@ def test_rejects_compatibility_over_500_chars(self) -> None:
159159
class TestTitleBlock:
160160
def test_renders_merchant_name_as_h1(self) -> None:
161161
out = build_skill_md(_base())
162-
assert "\n# Martin Estate\n" in out
162+
assert "\n# Example Merchant\n" in out
163163

164164
def test_renders_title_tagline_intro_with_blank_lines(self) -> None:
165165
cfg = _base()
166166
cfg.tagline = "A classic is forever"
167167
cfg.intro = "Napa Valley winery, family-run."
168168
out = build_skill_md(cfg)
169-
assert "# Martin Estate\n\n_A classic is forever_\n\nNapa Valley winery, family-run." in out
169+
assert "# Example Merchant\n\n_A classic is forever_\n\nNapa Valley winery, family-run." in out
170170

171171
def test_renders_tagline_only(self) -> None:
172172
cfg = _base()
173173
cfg.tagline = "A classic is forever"
174174
out = build_skill_md(cfg)
175-
assert "# Martin Estate\n\n_A classic is forever_" in out
175+
assert "# Example Merchant\n\n_A classic is forever_" in out
176176

177177
def test_renders_intro_only(self) -> None:
178178
cfg = _base()
179179
cfg.intro = "Napa Valley winery."
180180
out = build_skill_md(cfg)
181-
assert "# Martin Estate\n\nNapa Valley winery." in out
181+
assert "# Example Merchant\n\nNapa Valley winery." in out
182182

183183

184184
class TestImportantFiles:
185185
def test_emits_self_reference(self) -> None:
186186
out = build_skill_md(_base())
187187
assert "## Important Files" in out
188-
assert "| **SKILL.md** (this file) | `https://martin-estate.com/skill.md` |" in out
188+
assert "| **SKILL.md** (this file) | `https://example.com/skill.md` |" in out
189189

190190
def test_appends_caller_files(self) -> None:
191191
cfg = _base()
192192
cfg.files = [
193-
SkillMdLink(label="llms.txt", url="https://martin-estate.com/llms.txt"),
194-
SkillMdLink(label="OpenAPI", url="https://martin-estate.com/openapi.json"),
193+
SkillMdLink(label="llms.txt", url="https://example.com/llms.txt"),
194+
SkillMdLink(label="OpenAPI", url="https://example.com/openapi.json"),
195195
]
196196
out = build_skill_md(cfg)
197-
assert "| llms.txt | `https://martin-estate.com/llms.txt` |" in out
198-
assert "| OpenAPI | `https://martin-estate.com/openapi.json` |" in out
197+
assert "| llms.txt | `https://example.com/llms.txt` |" in out
198+
assert "| OpenAPI | `https://example.com/openapi.json` |" in out
199199

200200
def test_strips_trailing_slash_from_homepage(self) -> None:
201201
cfg = _base()
202-
cfg.homepage = "https://martin-estate.com/"
202+
cfg.homepage = "https://example.com/"
203203
out = build_skill_md(cfg)
204-
assert "`https://martin-estate.com/skill.md`" in out
204+
assert "`https://example.com/skill.md`" in out
205205
assert "//skill.md" not in out
206206

207207
def test_escapes_pipes_in_files(self) -> None:
@@ -364,10 +364,10 @@ def test_escapes_pipes_in_endpoints(self) -> None:
364364
class TestTriggersSection:
365365
def test_emits_each_trigger(self) -> None:
366366
cfg = _base()
367-
cfg.triggers = ["Buy wine from Martin Estate", "Check order status"]
367+
cfg.triggers = ["Buy from Example Merchant", "Check order status"]
368368
out = build_skill_md(cfg)
369369
assert "## Triggers" in out
370-
assert "- Buy wine from Martin Estate" in out
370+
assert "- Buy from Example Merchant" in out
371371
assert "- Check order status" in out
372372

373373
def test_omits_when_empty(self) -> None:
@@ -390,12 +390,12 @@ def test_emits_numbered_onboarding(self) -> None:
390390
def test_emits_support_links(self) -> None:
391391
cfg = _base()
392392
cfg.support_links = [
393-
SkillMdLink(label="Homepage", url="https://martin-estate.com"),
393+
SkillMdLink(label="Homepage", url="https://example.com"),
394394
SkillMdLink(label="Pay CLI", url="https://github.com/agentscore/pay"),
395395
]
396396
out = build_skill_md(cfg)
397397
assert "## Support" in out
398-
assert "- **Homepage**: https://martin-estate.com" in out
398+
assert "- **Homepage**: https://example.com" in out
399399
assert "- **Pay CLI**: https://github.com/agentscore/pay" in out
400400

401401

tests/test_ucp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ def test_preserves_caller_capabilities_and_appends_agentscore():
8383
def test_passes_through_name_payment_handlers_extras():
8484
profile = build_ucp_profile(
8585
**_base_kwargs(),
86-
name="Martin Estate",
86+
name="Example Merchant",
8787
payment_handlers=[
8888
UCPPaymentHandler(name="tempo", config={"recipient": "0xtempo"}),
8989
UCPPaymentHandler(name="stripe", config={"profile_id": "prof_x"}),
9090
],
9191
extras={"custom_field": "custom_value"},
9292
)
9393
d = profile.to_dict()
94-
assert d["name"] == "Martin Estate"
94+
assert d["name"] == "Example Merchant"
9595
assert len(d["payment_handlers"]) == 2
9696
assert d["custom_field"] == "custom_value"
9797

0 commit comments

Comments
 (0)