def test_not_follows_registration_under_one_hour(self, mock_notification): current_time = timezone.now() self.pool.activation_date = current_time + timedelta(minutes=45) self.pool.save() send_registration_reminder_mail.delay() mock_notification.assert_not_called()
def test_follows_registration_over_one_hour(self, mock_notification): current_time = timezone.now() self.pool.activation_date = current_time + timedelta(minutes=75) self.pool.save() FollowEvent.objects.get_or_create(follower=self.recipient, target=self.pool.event) send_registration_reminder_mail.delay() mock_notification.assert_not_called()