Skip to content

Commit e117a99

Browse files
committed
test: update nameIdentifier assertions to match 0.9.2 (no scheme/schemeURI)
1 parent a53150d commit e117a99

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

tests/test_identifiers.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ def test_infers_scheme_for_existing_name_identifier(self):
337337
}
338338
result = enrich_json_with_identifiers(data, "")
339339
ni = result["creators"][0]["nameIdentifiers"][0]
340-
assert ni["nameIdentifierScheme"] == "ORCID"
341-
assert ni["schemeURI"] == "https://orcid.org"
340+
assert ni["nameIdentifier"] == "https://orcid.org/0000-0002-1825-0097"
341+
assert "nameIdentifierScheme" not in ni
342+
assert "schemeURI" not in ni
342343

343344
def test_infers_funder_scheme(self):
344345
data = {
@@ -441,8 +442,9 @@ def test_existing_orcid_normalized_by_default(self):
441442
}
442443
result = enrich_json_with_identifiers(data, "")
443444
ni = result["creators"][0]["nameIdentifiers"][0]
444-
assert ni["nameIdentifierScheme"] == "ORCID"
445-
assert ni["schemeURI"] == "https://orcid.org"
445+
assert ni["nameIdentifier"] == "https://orcid.org/0000-0002-1825-0097"
446+
assert "nameIdentifierScheme" not in ni
447+
assert "schemeURI" not in ni
446448

447449
def test_explicit_flag_enables_doi(self):
448450
data = {"creators": [{"name": "Doe, John"}]}

tests/test_orcid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def test_enrich_attaches_orcid():
117117
ni = out[0]["nameIdentifiers"]
118118
assert len(ni) == 1
119119
assert ni[0]["nameIdentifier"] == "https://orcid.org/0000-0001-2345-6789"
120-
assert ni[0]["nameIdentifierScheme"] == "ORCID"
121-
assert ni[0]["schemeURI"] == "https://orcid.org"
120+
assert "nameIdentifierScheme" not in ni[0]
121+
assert "schemeURI" not in ni[0]
122122

123123

124124
def test_enrich_skips_existing_orcid():

0 commit comments

Comments
 (0)