From 35ce153323e0d61a5ac2e8fffc29fd55b0883613 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 14:00:51 +0200
Subject: [PATCH] fix usage of autouse

---
 integrationtests/test_issues.py                       | 4 ++--
 integrationtests/test_realworld_example.py            | 4 ++--
 integrationtests/test_use_case_simple_presentation.py | 4 ++--
 unittests/test_tool.py                                | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/integrationtests/test_issues.py b/integrationtests/test_issues.py
index 5a141f94..32bf5320 100644
--- a/integrationtests/test_issues.py
+++ b/integrationtests/test_issues.py
@@ -30,8 +30,8 @@ from caosdb.utils.register_tests import clear_database, set_test_key
 set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2")
 
 
-@pytest.fixture
-def clear_cache(autouse=True):
+@fixture(autouse=True)
+def clear_cache():
     cache_clear()
 
 
diff --git a/integrationtests/test_realworld_example.py b/integrationtests/test_realworld_example.py
index e7b4ab37..63abf068 100644
--- a/integrationtests/test_realworld_example.py
+++ b/integrationtests/test_realworld_example.py
@@ -56,8 +56,8 @@ def rfp(*pathcomponents):
 DATADIR = rfp("test_data", "extroot", "realworld_example")
 
 
-@pytest.fixture
-def clear_cache(autouse=True):
+@pytest.fixture(autouse=True)
+def clear_cache():
     cache_clear()
 
 
diff --git a/integrationtests/test_use_case_simple_presentation.py b/integrationtests/test_use_case_simple_presentation.py
index 8721b515..e7ae2ea6 100644
--- a/integrationtests/test_use_case_simple_presentation.py
+++ b/integrationtests/test_use_case_simple_presentation.py
@@ -39,8 +39,8 @@ DATADIR = os.path.join(os.path.dirname(__file__), "test_data",
                        "extroot", "use_case_simple_presentation")
 
 
-@pytest.fixture
-def clear_cache(autouse=True):
+@pytest.fixture(autouse=True)
+def clear_cache():
     cache_clear()
 
 
diff --git a/unittests/test_tool.py b/unittests/test_tool.py
index c8b11523..d0393953 100755
--- a/unittests/test_tool.py
+++ b/unittests/test_tool.py
@@ -76,8 +76,8 @@ def dircheckstr(*pathcomponents):
             "test_directories", "examples_article", *pathcomponents))
 
 
-@pytest.fixture
-def clear_cache(autouse=True):
+@pytest.fixture(autouse=True)
+def clear_cache():
     cache_clear()
 
 
-- 
GitLab