Skip to content

Commit 4c07ad2

Browse files
Fix tests
1 parent 9d37096 commit 4c07ad2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_config.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,11 @@ def test_oauth_token_with_oauth_provider(mocker):
223223
mock_oauth_provider = mocker.Mock(spec=OAuthCredentialsProvider)
224224
mock_oauth_provider.oauth_token.return_value = mock_token
225225

226-
# Create config with mocked header factory
227-
config = Config(host="https://test.databricks.com", client_id="test-client-id", client_secret="test-client-secret")
226+
# Create config with noop credentials to avoid network calls
227+
config = Config(
228+
host="https://test.databricks.com",
229+
credentials_strategy=noop_credentials
230+
)
228231

229232
# Replace the header factory with our mock
230233
config._header_factory = mock_oauth_provider
@@ -247,8 +250,11 @@ def test_oauth_token_reuses_existing_provider(mocker):
247250
mock_oauth_provider = mocker.Mock(spec=OAuthCredentialsProvider)
248251
mock_oauth_provider.oauth_token.return_value = mock_token
249252

250-
# Create config with mocked header factory
251-
config = Config(host="https://test.databricks.com", client_id="test-client-id", client_secret="test-client-secret")
253+
# Create config with noop credentials to avoid network calls
254+
config = Config(
255+
host="https://test.databricks.com",
256+
credentials_strategy=noop_credentials
257+
)
252258

253259
# Replace the header factory with our mock
254260
config._header_factory = mock_oauth_provider

0 commit comments

Comments
 (0)