Skip to content

Commit ace5edc

Browse files
committed
minor
1 parent cab0e4f commit ace5edc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/test_disable_discovery.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
from 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"
108
TEST_ERROR = "Test error"
119
TEST_QUERY = "SELECT 1 + 2 AS sum"
1210

13-
1411
@pytest.fixture
1512
def 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():
5855
mock_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
6659
def test_driver_config_has_disable_discovery_option(endpoint, database):
6760
"""Test that DriverConfig has the disable_discovery option."""

0 commit comments

Comments
 (0)