def test_reset_invalid_date(self, mocked_now_date, mocked_reset_date): user = UserFactory.create(userprofile__is_rotm_nominee=True) mocked_reset_date.return_value = now().date() - timedelta(days=1) mocked_now_date.return_value = now() eq_(user.userprofile.is_rotm_nominee, True) reset_rotm_nominees() user_profile = UserProfile.objects.get(pk=user.userprofile.pk) eq_(user_profile.is_rotm_nominee, True)