def test_comment_save_to_session(session): """Assert that the comment is saved to the session but not committed.""" from sqlalchemy.orm.session import Session comment = Comment() assert not session.new assert not Session.object_session(comment) comment.save_to_session() assert comment.id is None assert session.new assert Session.object_session(comment)
def test_comment_save_to_session(session): """Assert the comment is saved toThe session, but not committed.""" from sqlalchemy.orm.session import Session # b = factory_business('CP1234567') # filing = factory_filing(b, AR_FILING) comment = Comment() assert not session.new assert not Session.object_session(comment) comment.save_to_session() assert comment.id is None assert session.new assert Session.object_session(comment)