From a97ef2ea46106bd677d10433c380bd161afdcc7b Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Fri, 24 Oct 2025 21:47:21 +0200 Subject: [PATCH] Update test_time_rounding_smoke.py --- tests/test_time_rounding_smoke.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/test_time_rounding_smoke.py b/tests/test_time_rounding_smoke.py index e62b91e..9dd71ff 100644 --- a/tests/test_time_rounding_smoke.py +++ b/tests/test_time_rounding_smoke.py @@ -64,10 +64,10 @@ class TestTimeRoundingFeatureSmokeTests: def test_user_can_view_rounding_settings(self, app, client, authenticated_user): """Test that user can access the settings page with rounding options""" with app.test_request_context(): - response = client.get('/settings') + response = client.get('/settings') - # Should be able to access settings page - assert response.status_code in [200, 302] # 302 if redirect to login + # Should be able to access settings page + assert response.status_code in [200, 302] # 302 if redirect to login def test_user_can_update_rounding_preferences(self, app, client, authenticated_user): """Test that user can update their rounding preferences""" @@ -207,21 +207,21 @@ class TestTimeRoundingFeatureSmokeTests: ] for interval, expected_seconds in test_cases: - user.time_rounding_minutes = interval - user.time_rounding_method = 'nearest' - db.session.commit() + user.time_rounding_minutes = interval + user.time_rounding_method = 'nearest' + db.session.commit() - entry = TimeEntry( - user_id=user.id, - project_id=project.id, - start_time=start_time, - end_time=end_time - ) + entry = TimeEntry( + user_id=user.id, + project_id=project.id, + start_time=start_time, + end_time=end_time + ) - db.session.add(entry) - db.session.flush() + db.session.add(entry) + db.session.flush() - assert entry.duration_seconds == expected_seconds, \ + assert entry.duration_seconds == expected_seconds, \ f"Failed for {interval}-minute rounding: expected {expected_seconds}, got {entry.duration_seconds}" db.session.rollback()