Skip to content
Snippets Groups Projects
Commit 8733473a authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

TST: clear caches in int tests

parent a078cea8
Branches
Tags
2 merge requests!123REL: Release v0.6.0,!115Use cached_get_entity_by
Pipeline #36291 canceled
...@@ -30,6 +30,11 @@ from caosdb.utils.register_tests import clear_database, set_test_key ...@@ -30,6 +30,11 @@ from caosdb.utils.register_tests import clear_database, set_test_key
set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2") set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2")
@pytest.fixture
def clear_cache(autouse=True):
cache_clear()
def test_issue_23(clear_database): def test_issue_23(clear_database):
"""Test that an update leaves existing properties, that were not found by """Test that an update leaves existing properties, that were not found by
the crawler, unchanged. the crawler, unchanged.
......
...@@ -56,6 +56,11 @@ def rfp(*pathcomponents): ...@@ -56,6 +56,11 @@ def rfp(*pathcomponents):
DATADIR = rfp("test_data", "extroot", "realworld_example") DATADIR = rfp("test_data", "extroot", "realworld_example")
@pytest.fixture
def clear_cache(autouse=True):
cache_clear()
@pytest.fixture @pytest.fixture
def addfiles(): def addfiles():
loadpath(path='/opt/caosdb/mnt/extroot/', loadpath(path='/opt/caosdb/mnt/extroot/',
......
...@@ -39,6 +39,11 @@ DATADIR = os.path.join(os.path.dirname(__file__), "test_data", ...@@ -39,6 +39,11 @@ DATADIR = os.path.join(os.path.dirname(__file__), "test_data",
"extroot", "use_case_simple_presentation") "extroot", "use_case_simple_presentation")
@pytest.fixture
def clear_cache(autouse=True):
cache_clear()
def test_complete_crawler(clear_database, caplog): def test_complete_crawler(clear_database, caplog):
# Setup the data model: # Setup the data model:
model = parser.parse_model_from_yaml(os.path.join(DATADIR, "model.yml")) model = parser.parse_model_from_yaml(os.path.join(DATADIR, "model.yml"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment