def test_no_double_begin(self):
    with testing.db.connect() as conn:
        conn.begin()
        assert_raises_message(exc.InvalidRequestError, 'a transaction is already begun for this connection', conn.begin)
def test_no_double_begin(self):
    with testing.db.connect() as conn:
        conn.begin()
        assert_raises_message(exc.InvalidRequestError, 'a transaction is already begun for this connection', conn.begin)