def test_hydrating_is_observed(self):
        DB.begin_transaction("dev")
        user = Observer.hydrate({"id": 10, "name": "joe"})

        self.assertEqual(TestM.observed_hydrating, 1)
        self.assertEqual(TestM.observed_hydrated, 1)
        DB.rollback("dev")
    def test_associate_records(self):
        DB.begin_transaction("dev")
        user = User.first()

        articles = [Articles.hydrate({"id": 1, "title": "associate records"})]

        user.save_many("articles", articles)
        DB.rollback("dev")
 def test_transaction_globally(self):
     connection = DB.begin_transaction("dev")
     self.assertEqual(connection, self.get_builder().new_connection())
     DB.commit("dev")
     DB.begin_transaction("dev")
     DB.rollback("dev")