abiramavarshini/rag-backend
0
1from app.db.database import SessionLocal2from app.db.models import User3from app.core.security import hash_password4 5def create_test_user():6 db = SessionLocal()7 try:8 user = db.query(User).filter(User.email == 'test@example.com').first()9 if not user:10 db.add(User(email='test@example.com', password_hash=hash_password('password123')))11 db.commit()12 print('Test user created: test@example.com / password123')13 else:14 print('Test user already exists')15 finally:16 db.close()17 18if __name__ == '__main__':19 create_test_user()20 