(db: Session)
| 81 | |
| 82 | |
| 83 | def test_update_user(db: Session) -> None: |
| 84 | password = random_lower_string() |
| 85 | email = random_email() |
| 86 | user_in = UserCreate(email=email, password=password, is_superuser=True) |
| 87 | user = create_user(session=db, user_create=user_in) |
| 88 | new_password = random_lower_string() |
| 89 | user_in_update = UserUpdate(password=new_password, is_superuser=True) |
| 90 | if user.id is not None: |
| 91 | update_user(session=db, db_user=user, user_in=user_in_update) |
| 92 | user_2 = db.get(User, user.id) |
| 93 | assert user_2 |
| 94 | assert user.email == user_2.email |
| 95 | assert verify_password(new_password, user_2.hashed_password) |
| 96 | |
| 97 | |
| 98 | def test_get_ai_usage_quota_for_user_no_quota(test_user): |
nothing calls this directly
no test coverage detected