Some more tests around api_auth

This commit is contained in:
Matthias
2020-12-27 14:57:01 +01:00
parent 29ce323649
commit 790f833653
3 changed files with 54 additions and 10 deletions

View File

@@ -73,7 +73,7 @@ def http_basic_or_jwt_token(form_data: HTTPBasicCredentials = Depends(httpbasic)
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Incorrect username or password",
detail="Unauthorized",
)

View File

@@ -19,13 +19,8 @@ class UvicornServer(uvicorn.Server):
def run_in_thread(self):
self.thread = threading.Thread(target=self.run)
self.thread.start()
# try:
while not self.started:
time.sleep(1e-3)
# yield
# finally:
# self.should_exit = True
# thread.join()
def cleanup(self):
self.should_exit = True