'Test remove incomplete accounts.'

@patch('mozillians.users.tasks.datetime')
def test_remove_incomplete_accounts(self, datetime_mock):

    complete_user = UserFactory.create(vouched=False, date_joined=datetime(2012, 1, 1))
    complete_vouched_user = UserFactory.create(date_joined=datetime(2013, 1, 1))
    incomplete_user_not_old = UserFactory.create(date_joined=datetime(2013, 1, 1), userprofile={'full_name': ''})
    incomplete_user_old = UserFactory.create(date_joined=datetime(2012, 1, 1), userprofile={'full_name': ''})
    datetime_mock.now.return_value = datetime(2013, 1, 1)
    remove_incomplete_accounts(days=0)
    ok_(User.objects.filter(id=complete_user.id).exists())
    ok_(User.objects.filter(id=complete_vouched_user.id).exists())
    ok_(User.objects.filter(id=incomplete_user_not_old.id).exists())
    ok_((not User.objects.filter(id=incomplete_user_old.id).exists()))
