def test_units_match(): class XxxMoney(int): currency = 'XXX' m1 = Money(1) m2 = Money(2) m3 = Money(3) m3._currency = 'XXX' m4 = XxxMoney(4) assert m1._units_match(m2) assert not m1._units_match(m3) assert m3._units_match(m4)
def test_units_match(): class XxxMoney(int): currency = 'XXX' m1 = Money(1) m2 = Money(2) m3 = Money(3) m3._currency = 'XXX' m4 = XxxMoney(4) assert m1._units_match(m2) assert not m1._units_match(m3) assert m3._units_match(m4)