'Test renewal notification for groups with invalidation_days less than 2 weeks'

@patch('mozillians.groups.tasks.now')
def test_invalidation_days_less_than_2_weeks(self, mock_now):

    curator = UserFactory.create()
    member = UserFactory.create()
    group = GroupFactory.create(name='foobar', invalidation_days=10, accepting_new_members=Group.REVIEWED)
    group.curators.add(curator.userprofile)
    group.add_member(member.userprofile)
    datetime_now = (now() + timedelta(days=10))
    mock_now.return_value = datetime_now
    with patch('mozillians.groups.tasks.send_mail', autospec=True) as mock_send_mail:
        notify_membership_renewal()
    ok_((not mock_send_mail.called))
