We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11579f5 commit f255f4aCopy full SHA for f255f4a
1 file changed
tests/unit/test_auth.py
@@ -223,8 +223,12 @@ def test_get_tokens_does_not_hang_when_no_callback_received(
223
# Do not actually launch a browser during the test.
224
mock_open_new.return_value = True
225
226
+ # Bind to an OS-assigned ephemeral port (0) rather than a fixed port so
227
+ # the test does not depend on a specific port being free. A fixed port
228
+ # that happens to be occupied would fail to bind and take the
229
+ # can't-find-free-port branch instead of the timeout path we exercise.
230
oauth_manager = OAuthManager(
- port_range=[8030],
231
+ port_range=[0],
232
client_id="mock-id",
233
idp_endpoint=InHouseOAuthEndpointCollection(),
234
http_client=MagicMock(),
0 commit comments