Some more tests around api_auth
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user