def create_non_active_user(self, realm: Realm, email: str, name: str) -> UserProfile:
    user = do_create_user(email=email, password='123', realm=realm, full_name=name, short_name=name)
    user.is_active = False
    user.save()
    return user
def create_non_active_user(self, realm: Realm, email: str, name: str) -> UserProfile:
    user = do_create_user(email=email, password='123', realm=realm, full_name=name, short_name=name)
    user.is_active = False
    user.save()
    return user