[WIP] Pb import halfapi dans test_jwt_middleware.

This commit is contained in:
Joël Maïzi 2020-07-03 11:42:10 +02:00 committed by Maxime Alves LIRMM@home
parent f423d78278
commit dd354648f8
5 changed files with 12 additions and 2 deletions

0
halfapi/lib/__init__.py Normal file
View File

View File

@ -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

View File

@ -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

4
pytest.ini Normal file
View File

@ -0,0 +1,4 @@
[pytest]
testpaths = tests halfapi
addopts = --doctest-modules
doctest_optionflags = ELLIPSIS

View File

@ -0,0 +1,7 @@
import jwt
from halfapi import app
def coucou():
return
def test_connected():
app.route('/', coucou)