def test_visit_reminder(self):
        reminder_to_visit_website()
        smses = SMS.objects.all()
        self.assertEqual(smses.count(), 0)
        now = datetime.utcnow()
        self.web_user2.last_login = now - timedelta(weeks=14)
        self.web_user2.save()

        reminder_to_visit_website()

        smses = SMS.objects.filter(date__gte=now)
        self.assertEqual(smses.count(), 1)

        set_sms_notifications(TEST_DOMAIN, self.web_user2, False)
        self.web_user2.save()

        now = datetime.utcnow()
        reminder_to_visit_website()

        smses = SMS.objects.filter(date__gte=now)
        self.assertEqual(smses.count(), 0)
dataset/ETHPy150Open dimagi/commcare-hq/custom/ewsghana/tests/test_reminders.py/TestReminders.test_visit_reminder/original