Skip to content

Commit 4f5eba0

Browse files
committed
Classify Wikidata as a Tier 2 verification source
1 parent ec308d9 commit 4f5eba0

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎app/verify/hosts.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"geekbench.com",
4848
"kimovil.com",
4949
"devicespecifications.com",
50+
"wikidata.org",
5051
}
5152
)
5253

‎tests/verify/test_offline.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,24 @@ def test_host_tiers():
1515
assert hosts.tier_of_host("en.wikipedia.org") == 1
1616
assert hosts.tier_of_host("ark.intel.com") == 1 # subdomain of intel.com
1717
assert hosts.tier_of_host("gsmarena.com") == 2
18+
assert hosts.tier_of_host("www.wikidata.org") == 2
1819
assert hosts.tier_of_host("www.kaggle.com") == 3
1920
assert hosts.tier_of_host("example.org") == 0
2021
assert hosts.best_tier(["https://kaggle.com/x", "https://en.wikipedia.org/y"]) == 1
2122

2223

24+
def test_wikidata_item_is_a_tier_two_source_for_a_complete_brand():
25+
rec = {
26+
"slug": "google", "founded_year": 1998,
27+
"description_en": "American technology company.",
28+
"source_urls": ["https://www.wikidata.org/wiki/Q95"],
29+
}
30+
score = _score("brand", rec)
31+
assert score.best_tier == 2
32+
assert score.band == "green"
33+
assert score.subscores["host"] == 18.0
34+
35+
2336
def test_complete_authoritative_cpu_is_green():
2437
rec = {
2538
"slug": "core-i9-14900k", "cores": 24, "threads": 32,

0 commit comments

Comments
 (0)