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

Function test_authenticate_user

backend/tests/auth/test_services.py:11–18  ·  view source on GitHub ↗
(db: Session)

Source from the content-addressed store, hash-verified

9
10
11def test_authenticate_user(db: Session) -> None:
12 email = random_email()
13 password = random_lower_string()
14 user_in = UserCreate(email=email, password=password)
15 user = create_user(session=db, user_create=user_in)
16 authenticated_user = authenticate(session=db, email=email, password=password)
17 assert authenticated_user
18 assert user.email == authenticated_user.email
19
20
21def test_not_authenticate_user(db: Session) -> None:

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected