Finish off backend tests
This commit is contained in:
16
tests/base.py
Normal file
16
tests/base.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
sys.path.append("..")
|
||||
|
||||
from src.main import app, get_db
|
||||
from tests.config.database import override_get_db
|
||||
|
||||
app.dependency_overrides[get_db] = override_get_db
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
username = "user1"
|
||||
password = "password"
|
||||
avatar = "lion"
|
||||
Reference in New Issue
Block a user