File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 55from ydb import _apis
66
77
8- # Common test constants and mock config
9- DISCOVERY_DISABLED_ERROR_MSG = "Discovery should not be executed when discovery is disabled"
108TEST_ERROR = "Test error"
119TEST_QUERY = "SELECT 1 + 2 AS sum"
1210
13-
1411@pytest .fixture
1512def mock_connection ():
1613 """Mock a YDB connection to avoid actual connections."""
@@ -48,7 +45,7 @@ def create_mock_discovery_resolver(path):
4845 def _mock_fixture ():
4946 with unittest .mock .patch (path ) as mock_resolve :
5047 # Configure mock to throw an exception if called
51- mock_resolve .side_effect = Exception (DISCOVERY_DISABLED_ERROR_MSG )
48+ mock_resolve .side_effect = Exception ("Discovery should not be executed when discovery is disabled" )
5249 yield mock_resolve
5350 return _mock_fixture
5451
@@ -58,10 +55,6 @@ def _mock_fixture():
5855mock_aio_discovery_resolver = pytest .fixture (create_mock_discovery_resolver ('ydb.aio.resolver.DiscoveryEndpointsResolver.resolve' ))
5956
6057
61- # We'll use the fixtures from conftest.py instead of these mock fixtures
62- # However, we'll keep them for tests that don't need the real YDB container
63-
64-
6558# Basic unit tests for DriverConfig
6659def test_driver_config_has_disable_discovery_option (endpoint , database ):
6760 """Test that DriverConfig has the disable_discovery option."""
You can’t perform that action at this time.
0 commit comments