Skip to content

Commit 1ed58bc

Browse files
committed
fix(tests): update wikidata identifier
* recent update in idutils started normalizing wikidata identifier * using fake value in tests caused normalization to fail * using real CERN's identifier fixes the test
1 parent d554b97 commit 1ed58bc

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def full_record(users):
585585
"place": "test location place",
586586
"description": "test location description",
587587
"identifiers": [
588-
{"identifier": "12345abcde", "scheme": "wikidata"},
588+
{"identifier": "Q42944", "scheme": "wikidata"},
589589
{"identifier": "12345abcde", "scheme": "geonames"},
590590
],
591591
}
@@ -855,7 +855,7 @@ def enhanced_full_record(users):
855855
"place": "test location place",
856856
"description": "test location description",
857857
"identifiers": [
858-
{"identifier": "12345abcde", "scheme": "wikidata"},
858+
{"identifier": "Q42944", "scheme": "wikidata"},
859859
{"identifier": "12345abcde", "scheme": "geonames"},
860860
],
861861
}

tests/resources/serializers/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def full_record_to_dict():
310310
},
311311
"identifiers": [
312312
{
313-
"identifier": "12345abcde",
313+
"identifier": "Q42944",
314314
"scheme": "wikidata",
315315
},
316316
{

tests/services/schemas/test_location.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def valid_full_location():
2121
"place": "test location place",
2222
"description": "test location description",
2323
"identifiers": [
24-
{"identifier": "12345abcde", "scheme": "wikidata"},
24+
# we need to pass a valid wikidata id as the IdentifierSchema normalizes it
25+
# using CERN's identifier here
26+
{"identifier": "Q42944", "scheme": "wikidata"},
2527
{"identifier": "12345abcde", "scheme": "geonames"},
2628
],
2729
}
@@ -37,7 +39,7 @@ def test_valid_full(app, valid_full_location):
3739
({"geometry": {"type": "Point", "coordinates": [-32.94682, -60.63932]}}),
3840
({"description": "test location description"}),
3941
({"place": "test location place"}),
40-
({"identifiers": [{"identifier": "12345abcde", "scheme": "wikidata"}]}),
42+
({"identifiers": [{"identifier": "Q42944", "scheme": "wikidata"}]}),
4143
],
4244
)
4345
def test_valid_minimal(app, valid_minimal_location):

0 commit comments

Comments
 (0)