def test_add_user(self, db_session): user = User(user_name="username", email="email", status=0) db_session.add(user) db_session.flush() user = db_session.query(User).filter(User.user_name == "username") user = user.first() assert user.user_name == "username" assert user.email == "email" assert user.status == 0
def test_add_user(self, db_session): user = User(user_name='username', email='email', status=0) db_session.add(user) db_session.flush() user = db_session.query(User).filter(User.user_name == 'username') user = user.first() assert user.user_name == 'username' assert user.email == 'email' assert user.status == 0