Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
etchegom committed Feb 13, 2025
1 parent 2631a0c commit 0b05ca3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions recoco/apps/reminders/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,30 @@ def test_due_reminder_honors_current_site(request, mocker):
assert reminder is None


@pytest.mark.django_db
def test_reminder_is_due_but_project_is_inactive(current_site, project):
today = timezone.localdate()
user = baker.make(auth_models.User)
assign_collaborator(user, project, is_owner=True)

kind = models.Reminder.NEW_RECO

project.inactive_since = timezone.now()
project.save()

baker.make(
models.Reminder,
deadline=today,
project=project,
site=current_site,
kind=kind,
)

reminder = api.get_due_reminder_for_project(current_site, project, kind=kind)

assert reminder is None


#################################################################
# Getting Recommendation
#################################################################
Expand Down

0 comments on commit 0b05ca3

Please sign in to comment.