From 8733473aeaf15f1e5922a9e6b19e68fd63de3059 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Wed, 3 May 2023 13:26:42 +0200
Subject: [PATCH] TST: clear caches in int tests

---
 integrationtests/test_issues.py                       | 5 +++++
 integrationtests/test_realworld_example.py            | 5 +++++
 integrationtests/test_use_case_simple_presentation.py | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/integrationtests/test_issues.py b/integrationtests/test_issues.py
index 08e254da..5a141f94 100644
--- a/integrationtests/test_issues.py
+++ b/integrationtests/test_issues.py
@@ -30,6 +30,11 @@ from caosdb.utils.register_tests import clear_database, set_test_key
 set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2")
 
 
+@pytest.fixture
+def clear_cache(autouse=True):
+    cache_clear()
+
+
 def test_issue_23(clear_database):
     """Test that an update leaves existing properties, that were not found by
     the crawler, unchanged.
diff --git a/integrationtests/test_realworld_example.py b/integrationtests/test_realworld_example.py
index 45873dde..e7b4ab37 100644
--- a/integrationtests/test_realworld_example.py
+++ b/integrationtests/test_realworld_example.py
@@ -56,6 +56,11 @@ def rfp(*pathcomponents):
 DATADIR = rfp("test_data", "extroot", "realworld_example")
 
 
+@pytest.fixture
+def clear_cache(autouse=True):
+    cache_clear()
+
+
 @pytest.fixture
 def addfiles():
     loadpath(path='/opt/caosdb/mnt/extroot/',
diff --git a/integrationtests/test_use_case_simple_presentation.py b/integrationtests/test_use_case_simple_presentation.py
index 5f66e6fa..8721b515 100644
--- a/integrationtests/test_use_case_simple_presentation.py
+++ b/integrationtests/test_use_case_simple_presentation.py
@@ -39,6 +39,11 @@ DATADIR = os.path.join(os.path.dirname(__file__), "test_data",
                        "extroot", "use_case_simple_presentation")
 
 
+@pytest.fixture
+def clear_cache(autouse=True):
+    cache_clear()
+
+
 def test_complete_crawler(clear_database, caplog):
     # Setup the data model:
     model = parser.parse_model_from_yaml(os.path.join(DATADIR, "model.yml"))
-- 
GitLab