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

Function test_create_access_token

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

Source from the content-addressed store, hash-verified

26
27
28def test_create_access_token(db: Session) -> None:
29 email = random_email()
30 password = random_lower_string()
31 user_in = UserCreate(email=email, password=password)
32 user = create_user(session=db, user_create=user_in)
33 token = create_access_token(subject=user.id, expires_delta=timedelta(minutes=15))
34 assert isinstance(token, str)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected