@@ -191,7 +191,6 @@ def test_authenticate_force_new(self, oauth):
191191 "expires_at" : time () + 3600 ,
192192 }
193193
194- # Setup mocks
195194 oauth .is_authenticated = Mock (return_value = True )
196195 oauth .get_authorization_url = Mock (return_value = ("test_url" , "test_state" ))
197196 oauth .fetch_token = Mock (return_value = mock_token )
@@ -215,7 +214,6 @@ def test_authenticate_uses_fetch_token_directly(self, oauth):
215214 "expires_at" : time () + 3600 ,
216215 }
217216
218- # Setup mocks
219217 oauth .get_authorization_url = Mock (return_value = ("test_url" , "test_state" ))
220218 oauth .fetch_token = Mock (return_value = mock_token )
221219 oauth .is_authenticated = Mock (return_value = False )
@@ -356,7 +354,6 @@ def test_fetch_token_catches_oauth_errors(self, oauth):
356354 mock_session .fetch_token .side_effect = original_error
357355 oauth .session = mock_session
358356
359- # Setup logger mock to capture log message
360357 mock_logger = Mock ()
361358 oauth .logger = mock_logger
362359
@@ -386,7 +383,6 @@ def test_fetch_token_no_matching_error_type(self, oauth):
386383 mock_session .fetch_token .side_effect = original_error
387384 oauth .session = mock_session
388385
389- # Setup logger mock to capture log message
390386 mock_logger = Mock ()
391387 oauth .logger = mock_logger
392388
@@ -479,7 +475,6 @@ def test_refresh_token_wraps_unexpected_errors(self, oauth):
479475 mock_session .refresh_token .side_effect = unexpected_error
480476 oauth .session = mock_session
481477
482- # Setup logger mock to capture log message
483478 mock_logger = Mock ()
484479 oauth .logger = mock_logger
485480
@@ -677,7 +672,6 @@ def test_is_authenticated_no_token(self, oauth):
677672
678673 def test_is_authenticated_with_valid_token (self , oauth ):
679674 """Test is_authenticated with a non-expired token"""
680- # Setup a valid token with future expiry
681675 future_time = time () + 3600 # 1 hour in the future
682676 oauth .token = {"access_token" : "valid_token" , "expires_at" : future_time }
683677
@@ -688,7 +682,6 @@ def test_is_authenticated_with_valid_token(self, oauth):
688682
689683 def test_is_authenticated_with_expired_token (self , oauth ):
690684 """Test is_authenticated with an expired token"""
691- # Setup an expired token
692685 past_time = time () - 3600 # 1 hour in the past
693686 oauth .token = {"access_token" : "expired_token" , "expires_at" : past_time }
694687
0 commit comments