Skip to content

Commit

Permalink
Merge doi resolve fix from 'usnistgov/integration' into rel/1.0.X
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed Jul 18, 2019
2 parents 40b0e73 + 28cb387 commit 779b22d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/nistoar/nerdm/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _doiinfo2reference(info, resolver):
if info.citation_text:
out['citation'] = info.citation_text

out['_extensionSchemas'] = [ CORE_SCHEMA_URI + "#DCiteReference" ]
out['_extensionSchemas'] = [ CORE_SCHEMA_URI+"#/definitions/DCiteReference" ]
return out


Expand Down
3 changes: 3 additions & 0 deletions python/nistoar/nerdm/tests/test_convert_doi.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ def test_datacite_doiinfo2reference(self):
self.assertEqual(ref['location'], "https://goober.org/10.10/XXX")
self.assertEqual(ref['issued'], '2002')
self.assertEqual(ref['citation'], 'ibid')
self.assertIn('_extensionSchemas', ref)
self.assertTrue(isinstance(ref['_extensionSchemas'], list))
self.assertTrue(ref['_extensionSchemas'][0].startswith("https://data.nist.gov/od/dm/nerdm-schema/v0.2#/definitions/"), msg="Unexpected extension schema URI: "+ref['_extensionSchemas'][0])

class TestDOIResolver(unittest.TestCase):

Expand Down

0 comments on commit 779b22d

Please sign in to comment.