mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
fix: fixed tests
This commit is contained in:
6
test.py
6
test.py
@@ -7,9 +7,7 @@ from sqlalchemy import create_engine
|
|||||||
from sqlalchemy.orm import sessionmaker
|
from sqlalchemy.orm import sessionmaker
|
||||||
|
|
||||||
from creyPY.fastapi.app import generate_unique_id
|
from creyPY.fastapi.app import generate_unique_id
|
||||||
from creyPY.fastapi.crud import (
|
from creyPY.fastapi.crud import get_object_or_404
|
||||||
get_object_or_404,
|
|
||||||
)
|
|
||||||
from creyPY.fastapi.models.base import Base
|
from creyPY.fastapi.models.base import Base
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +63,7 @@ class TestMyFunction(unittest.TestCase):
|
|||||||
def test_get_object_or_404_existing_object(self):
|
def test_get_object_or_404_existing_object(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
obj_id = UUID("123e4567-e89b-12d3-a456-426614174000")
|
obj_id = UUID("123e4567-e89b-12d3-a456-426614174000")
|
||||||
obj = MockDBClass(obj_id)
|
obj = MockDBClass(id=obj_id)
|
||||||
self.db.add(obj)
|
self.db.add(obj)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user