Beispiel #1
0
def test_units_match():
    class XxxMoney(int):
        currency = 'XXX'

    m1 = Money(1, 'EUR')
    m2 = Money(2, 'EUR')
    m3 = Money(3, 'XXX')
    m4 = XxxMoney(4)

    assert m1.unit_matches_with(m2)
    assert not m1.unit_matches_with(m3)
    assert m3.unit_matches_with(m4)
Beispiel #2
0
def test_units_match():
    class XxxMoney(int):
        currency = 'XXX'

    m1 = Money(1, 'EUR')
    m2 = Money(2, 'EUR')
    m3 = Money(3, 'XXX')
    m4 = XxxMoney(4)

    assert m1.unit_matches_with(m2)
    assert not m1.unit_matches_with(m3)
    assert m3.unit_matches_with(m4)
Beispiel #3
0
def test_units_match():
    class XxxMoney(int):
        currency = "XXX"

    m1 = Money(1, "EUR")
    m2 = Money(2, "EUR")
    m3 = Money(3, "XXX")
    m4 = XxxMoney(4)

    assert m1.unit_matches_with(m2)
    assert not m1.unit_matches_with(m3)
    assert m3.unit_matches_with(m4)
Beispiel #4
0
def test_units_match():
    class XxxMoney(int):
        currency = "XXX"

    m1 = Money(1, "EUR")
    m2 = Money(2, "EUR")
    m3 = Money(3, "XXX")
    m4 = XxxMoney(4)

    assert m1.unit_matches_with(m2)
    assert not m1.unit_matches_with(m3)
    assert m3.unit_matches_with(m4)