fix(test_auth): cover mismatched referer situation

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-12-01 11:53:43 -08:00
parent 043ac7fe92
commit 112837e0e9
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 31 additions and 3 deletions

View file

@ -1,3 +1,5 @@
from typing import Dict
import aurweb.config
@ -27,7 +29,13 @@ class URL:
class Request:
""" A fake Request object which mimics a FastAPI Request for tests. """
client = Client()
cookies = dict()
headers = dict()
user = User()
url = URL()
def __init__(self,
method: str = "GET",
headers: Dict[str, str] = dict(),
cookies: Dict[str, str] = dict()) -> "Request":
self.method = method.upper()
self.headers = headers
self.cookies = cookies