diff --git a/fittrackee/config.py b/fittrackee/config.py index c7617111..13010084 100644 --- a/fittrackee/config.py +++ b/fittrackee/config.py @@ -18,7 +18,6 @@ XDIST_WORKER = ( class BaseConfig: - DEBUG = False TESTING = False SQLALCHEMY_TRACK_MODIFICATIONS = False diff --git a/fittrackee/tests/emails/test_email_service.py b/fittrackee/tests/emails/test_email_service.py index cf319b60..25b347b6 100644 --- a/fittrackee/tests/emails/test_email_service.py +++ b/fittrackee/tests/emails/test_email_service.py @@ -90,7 +90,6 @@ class TestEmailServiceUrlParser(CallArgsMixin): class TestEmailServiceSend(CallArgsMixin): - email_data = { 'expiration_delay': '3 seconds', 'username': 'test', @@ -112,7 +111,6 @@ class TestEmailServiceSend(CallArgsMixin): def test_it_sends_message( self, mock_smtp: Mock, mock_smtp_ssl: Mock, app: Flask ) -> None: - email_service.send( template='password_reset_request', lang='en', @@ -164,7 +162,6 @@ class TestEmailServiceSend(CallArgsMixin): def test_it_sends_message_without_authentication( self, mock_smtp: Mock, mock_smtp_ssl: Mock, app_wo_email_auth: Flask ) -> None: - email_service.send( template='password_reset_request', lang='en', diff --git a/fittrackee/tests/oauth2/test_oauth2_client.py b/fittrackee/tests/oauth2/test_oauth2_client.py index db86b46c..163f29ed 100644 --- a/fittrackee/tests/oauth2/test_oauth2_client.py +++ b/fittrackee/tests/oauth2/test_oauth2_client.py @@ -33,7 +33,6 @@ class TestCreateOAuth2Client: with patch( 'fittrackee.oauth2.client.gen_salt', return_value=client_id ): - oauth_client = create_oauth2_client(TEST_METADATA, user_1) assert oauth_client.client_id == client_id @@ -157,7 +156,6 @@ class TestCreateOAuth2Client: with patch( 'fittrackee.oauth2.client.gen_salt', return_value=client_secret ): - oauth_client = create_oauth2_client(TEST_METADATA, user_1) assert oauth_client.client_secret == client_secret diff --git a/fittrackee/tests/oauth2/test_oauth2_routes.py b/fittrackee/tests/oauth2/test_oauth2_routes.py index 76f4d4a3..b188d8c5 100644 --- a/fittrackee/tests/oauth2/test_oauth2_routes.py +++ b/fittrackee/tests/oauth2/test_oauth2_routes.py @@ -139,7 +139,6 @@ class TestOAuthClientCreation(ApiTestCaseMixin): 'fittrackee.oauth2.client.gen_salt', side_effect=[client_id, client_secret], ): - response = client.post( self.route, data=json.dumps(TEST_OAUTH_CLIENT_METADATA), diff --git a/fittrackee/tests/users/test_auth_api.py b/fittrackee/tests/users/test_auth_api.py index 77f74a55..c0a4d354 100644 --- a/fittrackee/tests/users/test_auth_api.py +++ b/fittrackee/tests/users/test_auth_api.py @@ -2631,7 +2631,6 @@ class TestUserLogout(ApiTestCaseMixin): app, user_1.email ) with freeze_time(now + timedelta(seconds=4)): - response = client.post( '/api/auth/logout', headers=dict(Authorization=f'Bearer {auth_token}'), diff --git a/fittrackee/tests/users/test_users_utils.py b/fittrackee/tests/users/test_users_utils.py index cc1a27e1..68ffda52 100644 --- a/fittrackee/tests/users/test_users_utils.py +++ b/fittrackee/tests/users/test_users_utils.py @@ -438,7 +438,6 @@ class TestDecodeUserToken: def test_it_raises_error_when_token_is_invalid(self, app: Flask) -> None: with pytest.raises(jwt.exceptions.DecodeError): - decode_user_token(random_string()) def test_it_raises_error_when_token_body_is_invalid( @@ -451,7 +450,6 @@ class TestDecodeUserToken: jwt.exceptions.InvalidSignatureError, match='Signature verification failed', ): - decode_user_token(modified_token) def test_it_raises_error_when_secret_key_is_invalid( @@ -471,7 +469,6 @@ class TestDecodeUserToken: jwt.exceptions.InvalidSignatureError, match='Signature verification failed', ): - decode_user_token(token) def test_it_raises_error_when_algorithm_is_not_hs256( @@ -494,7 +491,6 @@ class TestDecodeUserToken: algorithm="RS256", ) with pytest.raises(jwt.exceptions.InvalidAlgorithmError): - decode_user_token(token) def test_it_raises_error_when_token_is_expired(self, app: Flask) -> None: @@ -503,7 +499,6 @@ class TestDecodeUserToken: with pytest.raises( jwt.exceptions.ExpiredSignatureError, match='Signature has expired' ): - decode_user_token(token) def test_it_returns_user_id(self, app: Flask) -> None: diff --git a/fittrackee/tests/workouts/test_stats_api.py b/fittrackee/tests/workouts/test_stats_api.py index 001ddade..f0258ef0 100644 --- a/fittrackee/tests/workouts/test_stats_api.py +++ b/fittrackee/tests/workouts/test_stats_api.py @@ -335,7 +335,6 @@ class TestGetStatsByTime(ApiTestCaseMixin): seven_workouts_user_1: Workout, workout_running_user_1: Workout, ) -> None: - client, auth_token = self.get_test_client_and_auth_token( app, user_1_paris.email ) diff --git a/fittrackee/tests/workouts/test_utils/test_gpx.py b/fittrackee/tests/workouts/test_utils/test_gpx.py index 84a0a554..058218ae 100644 --- a/fittrackee/tests/workouts/test_utils/test_gpx.py +++ b/fittrackee/tests/workouts/test_utils/test_gpx.py @@ -46,7 +46,6 @@ class TestStoppedSpeedThreshold: 'gpxpy.gpx.GPXTrackSegment.get_moving_data', return_value=moving_data, ) as gpx_track_segment_mock: - process_files( auth_user=user_1, folders=folders, @@ -81,7 +80,6 @@ class TestStoppedSpeedThreshold: 'gpxpy.gpx.GPXTrackSegment.get_moving_data', return_value=moving_data, ) as gpx_track_segment_mock: - process_files( auth_user=user_1, folders=folders, @@ -109,7 +107,6 @@ class TestGetGpxInfoStopTime: in segments """ with patch('builtins.open', return_value=gpx_file): - gpx_data, _, _ = get_gpx_info( gpx_file=random_string(), stopped_speed_threshold=0.0 ) @@ -124,7 +121,6 @@ class TestGetGpxInfoStopTime: in segments """ with patch('builtins.open', return_value=gpx_file_with_3_segments): - gpx_data, _, _ = get_gpx_info( gpx_file=random_string(), stopped_speed_threshold=0.0 ) diff --git a/fittrackee/tests/workouts/test_utils/test_weather_service.py b/fittrackee/tests/workouts/test_utils/test_weather_service.py index c32ac945..a9c97b42 100644 --- a/fittrackee/tests/workouts/test_utils/test_weather_service.py +++ b/fittrackee/tests/workouts/test_utils/test_weather_service.py @@ -67,7 +67,6 @@ class TestDarksky(WeatherTestCase): with patch( 'fittrackee.workouts.utils.weather.dark_sky.forecastio' ) as forecast_io_mock: - darksky.get_weather(point) forecast_io_mock.load_forecast.assert_called_with( @@ -102,7 +101,6 @@ class TestDarksky(WeatherTestCase): with patch( 'fittrackee.workouts.utils.weather.dark_sky.forecastio' ) as forecast_io_mock: - darksky.get_weather(point) forecast_io_mock.load_forecast.assert_called_with( @@ -189,7 +187,6 @@ class TestVisualCrossingGetWeather(WeatherTestCase, CallArgsMixin): point = self.get_gpx_point(time) visual_crossing = VisualCrossing(api_key=self.api_key) with patch.object(requests, 'get') as get_mock: - visual_crossing.get_weather(point) args = self.get_args(get_mock.call_args) @@ -202,7 +199,6 @@ class TestVisualCrossingGetWeather(WeatherTestCase, CallArgsMixin): def test_it_calls_api_with_expected_params(self) -> None: visual_crossing = VisualCrossing(api_key=self.api_key) with patch.object(requests, 'get') as get_mock: - visual_crossing.get_weather(self.get_gpx_point(datetime.utcnow())) kwargs = self.get_kwargs(get_mock.call_args) @@ -232,7 +228,6 @@ class TestVisualCrossingGetWeather(WeatherTestCase, CallArgsMixin): ) visual_crossing = VisualCrossing(api_key=self.api_key) with patch.object(requests, 'get', return_value=self.get_response()): - weather_data = visual_crossing.get_weather(point) current_conditions: Dict = VISUAL_CROSSING_RESPONSE[ # type: ignore