Skip to content

Commit

Permalink
remove simplejson usage from legacy extractor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-monch committed Sep 9, 2022
1 parent eb7e01b commit 332a427
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions datalad_metalad/extractors/legacy/tests/test_datacite_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Test datacite metadata extractor """

from simplejson import dumps
import json

from datalad.api import create
from datalad.tests.utils_pytest import (
Expand Down Expand Up @@ -73,7 +73,7 @@ def test_get_metadata(path=None):
ds.save()
meta = DataciteMetadataExtractor(ds, 'elsewhere')._get_dataset_metadata()
assert_equal(
dumps(meta, sort_keys=True, indent=2),
json.dumps(meta, sort_keys=True, indent=2),
"""\
{
"author": [
Expand Down
6 changes: 3 additions & 3 deletions datalad_metalad/extractors/tests/test_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Test custom metadata extractor"""

import json
from six import text_type

from datalad.distribution.dataset import Dataset
Expand All @@ -19,7 +20,6 @@
known_failure_windows,
with_tree,
)
from simplejson import dumps as jsondumps


# some metadata to play with, taken from the examples of the google dataset
Expand Down Expand Up @@ -85,9 +85,9 @@
@with_tree(
tree={
'.metadata': {
'dataset.json': jsondumps(sample_jsonld)},
'dataset.json': json.dumps(sample_jsonld)},
'down': {
'customloc': jsondumps(testmeta)}})
'customloc': json.dumps(testmeta)}})
def test_custom_dsmeta(path=None):
ds = Dataset(path).create(force=True)
sample_jsonld_ = dict(sample_jsonld)
Expand Down

0 comments on commit 332a427

Please sign in to comment.