fix linting issues

This commit is contained in:
Joshua Taillon
2023-05-21 11:29:56 -06:00
parent cef28c52a2
commit 8637ecb203
7 changed files with 14 additions and 13 deletions

View File

@ -76,6 +76,7 @@ def user_1_raw_speed() -> User:
db.session.commit()
return user
@pytest.fixture()
def user_1_paris() -> User:
user = User(username='test', email='test@test.com', password='12345678')

View File

@ -54,8 +54,7 @@ class TestStoppedSpeedThreshold:
)
assert gpx_track_segment_mock.call_args_list[0] == call(
stopped_speed_threshold=expected_threshold,
raw=False
stopped_speed_threshold=expected_threshold, raw=False
)
gpx_track_segment_mock.assert_called_with(
expected_threshold, # stopped_speed_threshold
@ -89,8 +88,7 @@ class TestStoppedSpeedThreshold:
)
assert gpx_track_segment_mock.call_args_list[0] == call(
stopped_speed_threshold=expected_threshold,
raw=False
stopped_speed_threshold=expected_threshold, raw=False
)
gpx_track_segment_mock.assert_called_with(
expected_threshold, # stopped_speed_threshold

View File

@ -279,7 +279,11 @@ class TestPostWorkoutWithGpx(ApiTestCaseMixin, CallArgsMixin):
assert_workout_data_with_gpx(data)
def test_it_adds_a_workout_with_gpx_file_raw_speed(
self, app: Flask, user_1_raw_speed: User, sport_1_cycling: Sport, gpx_file: str
self,
app: Flask,
user_1_raw_speed: User,
sport_1_cycling: Sport,
gpx_file: str,
) -> None:
client, auth_token = self.get_test_client_and_auth_token(
app, user_1_raw_speed.email
@ -301,7 +305,7 @@ class TestPostWorkoutWithGpx(ApiTestCaseMixin, CallArgsMixin):
assert response.status_code == 201
assert 'created' in data['status']
assert len(data['data']['workouts']) == 1
# max speed should be slightly higher than that tested in
# max speed should be slightly higher than that tested in
# assert_workout_data_with_gpx
assert data['data']['workouts'][0]['max_speed'] == pytest.approx(5.25)