diff --git a/halfapi/lib/__init__.py b/halfapi/lib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/halfapi/lib/jwt_middleware.py b/halfapi/lib/jwt_middleware.py index b4a2be2..434083f 100644 --- a/halfapi/lib/jwt_middleware.py +++ b/halfapi/lib/jwt_middleware.py @@ -53,7 +53,6 @@ class JWTUser(BaseUser): class JWTAuthenticationBackend(AuthenticationBackend): - def __init__(self, secret_key: str, algorithm: str = 'HS256', prefix: str = 'JWT', name: str = 'name'): self.secret_key = secret_key self.algorithm = algorithm diff --git a/halfapi/lib/query.py b/halfapi/lib/query.py index f658aec..b739916 100644 --- a/halfapi/lib/query.py +++ b/halfapi/lib/query.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 from starlette.exceptions import HTTPException -from halfapi.lib.responses import CSVResponse +from .responses import CSVResponse """ This is the *query* library that contains all the useful functions to treat our diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..25c7847 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = tests halfapi +addopts = --doctest-modules +doctest_optionflags = ELLIPSIS diff --git a/tests/test_jwt_middleware.py b/tests/test_jwt_middleware.py new file mode 100644 index 0000000..22e12cc --- /dev/null +++ b/tests/test_jwt_middleware.py @@ -0,0 +1,7 @@ +import jwt +from halfapi import app + +def coucou(): + return +def test_connected(): + app.route('/', coucou)