From 854ad8d0207a9e9ef623402d07e6890e0351349d Mon Sep 17 00:00:00 2001 From: Lakmina Pramodya Gamage Date: Mon, 13 Jan 2025 01:47:50 +0530 Subject: [PATCH] fix: ensure database cleanup after tests by dropping all tables --- tests/test_crud.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_crud.py b/tests/test_crud.py index 017ed30..e9fed34 100644 --- a/tests/test_crud.py +++ b/tests/test_crud.py @@ -18,6 +18,7 @@ def db(): yield db finally: db.close() + models.Base.metadata.drop_all(bind=engine) def test_create_student(db): student = schemas.StudentCreate(name="Luke", email="luke@gmail.com", address="Kandy", contactNo="0771234567", cgpa=3.77)