feat: add repository Protocol interfaces for User, Credential, MagicLink
This commit is contained in:
parent
b22325588a
commit
fd8c8cbf39
2 changed files with 66 additions and 0 deletions
13
tests/test_store/test_protocols.py
Normal file
13
tests/test_store/test_protocols.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from typing import runtime_checkable
|
||||
|
||||
from fastapi_oidc_op.store.protocols import (
|
||||
CredentialRepository,
|
||||
MagicLinkRepository,
|
||||
UserRepository,
|
||||
)
|
||||
|
||||
|
||||
def test_protocols_are_runtime_checkable() -> None:
|
||||
assert runtime_checkable(UserRepository) # type: ignore[arg-type]
|
||||
assert runtime_checkable(CredentialRepository) # type: ignore[arg-type]
|
||||
assert runtime_checkable(MagicLinkRepository) # type: ignore[arg-type]
|
||||
Loading…
Add table
Add a link
Reference in a new issue