diff --git a/tests/test_auth/test_token_manager.py b/tests/test_auth/test_token_manager.py index 3103e2f4cb..cdbf60889d 100644 --- a/tests/test_auth/test_token_manager.py +++ b/tests/test_auth/test_token_manager.py @@ -17,17 +17,17 @@ class TestTokenManager: @pytest.mark.parametrize( - "exp_refresh_ratio,tokens_refreshed", + "exp_refresh_ratio", [ - (0.9, [2, 3]), - (0.28, [4, 5]), + 0.9, + 0.28, ], ids=[ - "Refresh ratio = 0.9, 2 tokens in 0,1 second", - "Refresh ratio = 0.28, 4 tokens in 0,1 second", + "Refresh ratio = 0.9", + "Refresh ratio = 0.28", ], ) - def test_success_token_renewal(self, exp_refresh_ratio, tokens_refreshed): + def test_success_token_renewal(self, exp_refresh_ratio): tokens = [] mock_provider = Mock(spec=IdentityProviderInterface) mock_provider.request_token.side_effect = [ @@ -70,7 +70,7 @@ def on_next(token): mgr.start(mock_listener) sleep(0.1) - assert len(tokens) in tokens_refreshed + assert len(tokens) > 0 @pytest.mark.parametrize( "exp_refresh_ratio,tokens_refreshed",