writing some unit tests

This commit is contained in:
Jack Case
2025-11-26 20:44:02 +00:00
parent 6a1837762e
commit 1cb9ae8606
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
from fastapi import FastAPI
from fastapi.testclient import TestClient
from slopserver.server import app as slopserver_app
client = TestClient(slopserver_app)

View File

@@ -0,0 +1,15 @@
from slopserver.db import *
from slopserver.models import *
from slopserver.settings import settings
from sqlalchemy import create_engine
import unittest
class TestDBFuncs(unittest.TestCase):
test_db_url = settings.db_url
engine = None
def setUp(self):
engine = create_engine(self.test_db_url)