From 4a891834017b5092ff2ed0bbca152698517ad5ec Mon Sep 17 00:00:00 2001 From: Keshav Mohta Date: Tue, 7 Jan 2025 11:57:10 +0530 Subject: [PATCH] fix: used setup_ssl.side_effect --- ingestion/tests/unit/test_ssl_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ingestion/tests/unit/test_ssl_manager.py b/ingestion/tests/unit/test_ssl_manager.py index 5cb22c471628..80516cb383ce 100644 --- a/ingestion/tests/unit/test_ssl_manager.py +++ b/ingestion/tests/unit/test_ssl_manager.py @@ -128,13 +128,16 @@ def test_init(self, mock_ssl_manager, test_connection): class CassandraSourceSSLTest(TestCase): - @patch("metadata.ingestion.source.database.cassandra.connection.get_connection") + @patch("metadata.utils.ssl_manager.SSLManager.setup_ssl") @patch( "metadata.ingestion.source.database.cassandra.metadata.CassandraSource.test_connection" ) - def test_init(self, get_connection, test_connection): + @patch("metadata.ingestion.source.database.cassandra.connection.get_connection") + def test_init(self, get_connection, test_connection, setup_ssl): get_connection.return_value = True test_connection.return_value = True + setup_ssl.side_effect = lambda x: x + config = WorkflowSource( **{ "type": "cassandra",