MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / test_get_user

Function test_get_user

backend/tests/users/test_services.py:62–70  ·  view source on GitHub ↗
(db: Session)

Source from the content-addressed store, hash-verified

60
61
62def test_get_user(db: Session) -> None:
63 password = random_lower_string()
64 username = random_email()
65 user_in = UserCreate(email=username, password=password, is_superuser=True)
66 user = create_user(session=db, user_create=user_in)
67 user_2 = db.get(User, user.id)
68 assert user_2
69 assert user.email == user_2.email
70 assert jsonable_encoder(user) == jsonable_encoder(user_2)
71
72
73def test_get_user_by_email(db: Session) -> None:

Callers

nothing calls this directly

Calls 4

random_lower_stringFunction · 0.90
random_emailFunction · 0.90
UserCreateClass · 0.90
create_userFunction · 0.90

Tested by

no test coverage detected