Changeset View
Changeset View
Standalone View
Standalone View
swh/search/tests/test_journal_client.py
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | def test_journal_client_origin_metadata_from_journal(): | ||||
worker_fn( | worker_fn( | ||||
{ | { | ||||
"origin_intrinsic_metadata": [ | "origin_intrinsic_metadata": [ | ||||
{ | { | ||||
"id": "http://foobar.baz", | "id": "http://foobar.baz", | ||||
"metadata": { | "metadata": { | ||||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | "@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||||
"description": "foo bar", | "description": "foo bar", | ||||
"programmingLanguage": "python", | |||||
"license": "MIT", | |||||
}, | }, | ||||
}, | }, | ||||
] | ] | ||||
} | } | ||||
) | ) | ||||
search_mock.origin_update.assert_called_once_with( | search_mock.origin_update.assert_called_once_with( | ||||
[ | [ | ||||
{ | { | ||||
"url": "http://foobar.baz", | "url": "http://foobar.baz", | ||||
"intrinsic_metadata": { | "intrinsic_metadata": { | ||||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | "@context": "https://doi.org/10.5063/schema/codemeta-2.0", | ||||
"description": "foo bar", | "description": "foo bar", | ||||
"programmingLanguage": "python", | |||||
"license": "MIT", | |||||
}, | }, | ||||
}, | }, | ||||
] | ] | ||||
) | ) |