fix: OSCBR backfill sends GTIN-8 in its canonical 8-digit form

This commit is contained in:
gti
2026-09-26 10:12:16 -03:00
parent 1e4a31ea88
commit 5281c1d79b
2 changed files with 16 additions and 1 deletions
+6
View File
@@ -102,3 +102,9 @@ def test_cosmos_out_of_chain_and_token_preferred():
assert "cosmos" not in names and names[0] == "oscbr" and build_providers(S())[0].configured
S.cosmos_enabled = True
assert build_providers(S())[0].name == "cosmos"
def test_provider_query_canonical_forms():
assert backfill.provider_query("00000078936683") == "78936683" # GTIN-8
assert backfill.provider_query("07891000100103") == "7891000100103" # EAN-13
assert backfill.provider_query("17891000100100") == "17891000100100" # GTIN-14 with indicator