From 53f01afab845007047c14ded5deb445ba1dbbbfe Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Tue, 17 Dec 2024 20:23:56 -0500 Subject: [PATCH] mongo singleton tests --- tests/misc_tests/singleton_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/misc_tests/singleton_test.py b/tests/misc_tests/singleton_test.py index bdb237df..82ba47cb 100644 --- a/tests/misc_tests/singleton_test.py +++ b/tests/misc_tests/singleton_test.py @@ -5,6 +5,7 @@ from flowcept.commons.daos.docdb_dao.lmdb_dao import LMDBDAO from flowcept.commons.daos.docdb_dao.mongodb_dao import MongoDBDAO from flowcept.commons.flowcept_logger import FlowceptLogger +from flowcept.configs import MONGO_ENABLED from flowcept.flowcept_api.db_api import DBAPI @@ -29,6 +30,7 @@ def test_singleton(self): #assert Flowcept.db._dao == dao #assert id(Flowcept.db._dao) == id(dao) + @unittest.skipIf(not MONGO_ENABLED, "MongoDB is disabled") def test_mongo_dao_singleton(self): doc_dao1 = MongoDBDAO() doc_dao2 = MongoDBDAO()