Exactly, I was looking for something like assertRaises on Django testing.
Anyway, just to be sure, this is what mean, right?

        try:
            conn.sendtoaddress(bitcoinaddress, 10000000)
            assert(0) # Should raise InsufficientFunds
        except InsufficientFunds:
            pass