示例#1
0
    def test_dao_put_author(self):

        author = Author()
        author.name = "John Snow"

        dao = AuthorDAO()
        dao.put(author)

        session = common.session()

        expected = [author]
        result = session.query(Author).all()
        self.assertEqual(result, expected)