Skip to content

Commit e442120

Browse files
Copilotazvoleff
andcommitted
Fix Ruff format errors in test_password_reset_token.py
Applied automatic Ruff formatting to test_password_reset_token.py to fix formatting issues Co-authored-by: azvoleff <107753+azvoleff@users.noreply.github.com>
1 parent 3396d80 commit e442120

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/test_password_reset_token.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ def test_reset_password_with_token_preserves_already_verified_user(self, app):
7575
country="US",
7676
institution="Test Institution",
7777
)
78-
original_verification_time = datetime.datetime(
79-
2024, 1, 1, 12, 0, 0
80-
)
78+
original_verification_time = datetime.datetime(2024, 1, 1, 12, 0, 0)
8179
user.email_verified = True
8280
user.email_verified_at = original_verification_time
8381
db.session.add(user)
@@ -100,10 +98,7 @@ def test_reset_password_with_token_preserves_already_verified_user(self, app):
10098
# Verify the original verification status is preserved
10199
assert updated_user.email_verified is True
102100
# Original verification time should be preserved (not updated)
103-
assert (
104-
updated_user.email_verified_at
105-
== original_verification_time
106-
)
101+
assert updated_user.email_verified_at == original_verification_time
107102

108103
def test_reset_password_with_invalid_token_fails(self, app):
109104
"""Test that invalid tokens are rejected."""
@@ -134,7 +129,9 @@ def test_reset_password_with_expired_token_fails(self, app):
134129
# Create an expired token
135130
reset_token = PasswordResetToken(user_id=user.id)
136131
# Set expiry to the past
137-
reset_token.expires_at = datetime.datetime.utcnow() - datetime.timedelta(hours=2)
132+
reset_token.expires_at = datetime.datetime.utcnow() - datetime.timedelta(
133+
hours=2
134+
)
138135
db.session.add(reset_token)
139136
db.session.commit()
140137

0 commit comments

Comments
 (0)