Skip to content

Commit

Permalink
fix: ensure database cleanup after tests by dropping all tables
Browse files Browse the repository at this point in the history
  • Loading branch information
lakminagamage committed Jan 12, 2025
1 parent f8d2b48 commit 854ad8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 854ad8d

Please sign in to comment.