Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Aug 7, 2024
1 parent 2c1f730 commit 338e336
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/api/views/user_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,8 @@ def test_send_inactivity_reminder(days: int, mail_sent: bool):
indy_users = list(IndependentUser.objects.all())
assert indy_users

for teacher_user in teacher_users:
teacher_user.date_joined = date_joined
teacher_user.last_login = None
teacher_user.save()

for indy_user in indy_users:
indy_user.last_login = last_login
indy_user.save()
TeacherUser.objects.update(date_joined=date_joined, last_login=None)
IndependentUser.objects.update(last_login=last_login)

with patch("src.api.views.user.send_mail") as send_mail_mock:
self.client.cron_job(action)
Expand Down

0 comments on commit 338e336

Please sign in to comment.