예제 #1
0
    def test_to_dict_after_commit(self):
        record = Foo()
        self.assertEqual(record.to_dict(), {})

        self.db.add_commit(record)

        self.assertNotEqual(record.to_dict(), {})
예제 #2
0
    def test_to_dict_after_commit(self):
        record = Foo()
        self.assertEqual(record.to_dict(), {})

        self.db.add_commit(record)
        self.assertEqual(record.to_dict(refresh_on_empty=False), {})
        self.assertNotEqual(record.to_dict(), {})