Skip to content

Commit

Permalink
Move datacite tests to reside near the datacite code
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Nov 4, 2024
1 parent 5741d28 commit 115bee0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
import pytest
import requests

from .utils import skipif_no_network
from ..datacite import _get_datacite_schema, to_datacite
from ..models import (
from dandischema.models import (
LicenseType,
PublishedDandiset,
RelationType,
ResourceType,
RoleType,
)
import dandischema.tests
from dandischema.tests.utils import skipif_no_network

from .. import _get_datacite_schema, to_datacite


def datacite_post(datacite: dict, doi: str) -> None:
Expand Down Expand Up @@ -142,7 +144,9 @@ def test_datacite(dandi_id: str, schema: Any) -> None:

# reading metadata taken from exemplary dandisets and saved in json files
with (
Path(__file__).with_name("data") / "metadata" / f"meta_{dandi_id}.json"
Path(dandischema.tests.__file__).with_name("data")
/ "metadata"
/ f"meta_{dandi_id}.json"
).open() as f:
meta_js = json.load(f)

Expand Down

0 comments on commit 115bee0

Please sign in to comment.