Skip to content

Commit

Permalink
Merge branch 'wip/validate-data-improve-annotation-of-data-classes' of
Browse files Browse the repository at this point in the history
…https://github.com/dasch-swiss/dsp-tools into wip/validate-data-improve-annotation-of-data-classes
  • Loading branch information
Nora-Olivia-Ammann committed Nov 15, 2024
2 parents 5ffc219 + 13551f9 commit b2f30ff
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions test/e2e/commands/ingest_xmlupload/test_ingest_xmlupload.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@
TMP_FOLDER = TMP_INGEST / "import" / SHORTCODE


@pytest.fixture(scope="module")
def mapping_file() -> Iterator[Path]:
mapping_file = Path(f"mapping-{SHORTCODE}.csv")
yield mapping_file
mapping_file.unlink(missing_ok=True)
@pytest.fixture
def mapping_file(monkeypatch: pytest.MonkeyPatch) -> Iterator[Path]:
with monkeypatch.context() as m:
m.chdir(CWD)
mapping_file = Path(f"mapping-{SHORTCODE}.csv")
yield mapping_file
mapping_file.unlink(missing_ok=True)
for id2iri_mapping in Path(".").glob("*id2iri_mapping*.json"):
id2iri_mapping.unlink(missing_ok=True)


@pytest.fixture
Expand All @@ -40,12 +44,10 @@ def _create_project() -> Iterator[None]:


@pytest.mark.usefixtures("_create_project")
def test_ingest_upload(mapping_file: Path, monkeypatch: pytest.MonkeyPatch) -> None:
with monkeypatch.context() as m:
m.chdir(CWD)
_test_upload_step()
_test_ingest_step(mapping_file)
_test_xmlupload_step()
def test_ingest_upload(mapping_file: Path) -> None:
_test_upload_step()
_test_ingest_step(mapping_file)
_test_xmlupload_step()


def _test_upload_step() -> None:
Expand Down

0 comments on commit b2f30ff

Please sign in to comment.