Skip to content

Commit c6fdd4a

Browse files
committed
test: keep storefront claim classifications distinct
1 parent cfa61d0 commit c6fdd4a

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎scripts/validate_storefront_claims.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@
7676
(
7777
"fixed allowance",
7878
re.compile(
79-
r"\b\d[\d,]*\s+(?:free\s+)?(?:api\s+requests?|station\s+queries?)"
80-
r"\s*(?:/|per\s+)month\b|"
8179
r"\bmonthly\s+station\s+(?:query|request)\s+limit\b",
8280
re.IGNORECASE,
8381
),

‎tests/test_storefront_claims.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ def test_rejects_fixed_rate_aliases_in_installed_text(tmp_path: Path, claim: str
184184
assert any("fixed demo rate" in failure for failure in failures), failures
185185

186186

187+
def test_reports_one_failure_for_overlapping_monthly_rate(tmp_path: Path) -> None:
188+
failures = _installed_text_failures(tmp_path, "50 API requests per month")
189+
190+
matching = [failure for failure in failures if "50 API requests per month" in failure]
191+
assert len(matching) == 1, failures
192+
193+
187194
@pytest.mark.parametrize(
188195
"text",
189196
[

0 commit comments

Comments
 (0)