Skip to content

Commit

Permalink
remove testdata after doap test
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 11, 2023
1 parent 6b5a61a commit d9d6e86
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/test_doap_serialization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import shutil
import unittest
from pathlib import Path

from dsp_permissions_scripts.models import scope
from dsp_permissions_scripts.models.doap import Doap, DoapTarget
Expand All @@ -11,9 +13,14 @@


class TestDoapSerialization(unittest.TestCase):
def test_doap_serialization(self):
shortcode = "1234"
shortcode = "1234"

def tearDown(self) -> None:
testdata_dir = Path(f"project_data/{self.shortcode}")
if testdata_dir.is_dir():
shutil.rmtree(testdata_dir)

def test_doap_serialization(self):
target1 = DoapTarget(
project="http://rdfh.ch/projects/MsOaiQkcQ7-QPxsYBKckfQ",
group="http://www.knora.org/ontology/knora-admin#ProjectAdmin",
Expand Down Expand Up @@ -44,11 +51,11 @@ def test_doap_serialization(self):

serialize_doaps_of_project(
project_doaps=[doap1, doap2],
shortcode=shortcode,
shortcode=self.shortcode,
mode="original",
)
deserialized_doaps = deserialize_doaps_of_project(
shortcode=shortcode,
shortcode=self.shortcode,
mode="original",
)

Expand Down

0 comments on commit d9d6e86

Please sign in to comment.