Companies as symbols: company_aliases, merge, duplicates, empty enrichment columns (migration 20)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:45:43 +02:00
1 parent 3adafd8950
commit 9172b2da72
8 files changed
+347 -17

No files matched your search

+10
View File
@@ -1670,3 +1670,13 @@ def test_a_kept_role_lists_its_copies_and_a_copy_names_its_kept_role(
"original_url": search.location, "posted_at": kept["copies"][0]["posted_at"]}]
copy = client.get(f"/api/roles/{search.uid}").json()
assert copy["dup_of"] == board.uid and copy["copies"] == []
def test_suggest_companies_matches_through_an_alias(client: TestClient, store: Store) -> None:
store.add_company("Ørsted")
store.upsert_role(posting("1", company="Orsted"))
store.add_alias("ørsted", "Dong Energy")
for q in ("orsted", "ørsted", "dong"):
res = client.get("/api/suggest/companies", params={"q": q})
assert [(c["key"], c["name"]) for c in res.json()] == [("ørsted", "Ørsted")]