Exemple #1
0
def test_get_amount_from_stripe():
    assert get_amount_from_stripe(100, 'USD') == Decimal(1)
    assert get_amount_from_stripe(100, 'usd') == Decimal(1)

    assert isclose(get_amount_from_stripe(1, 'USD'), Decimal(0.01))
    assert isclose(get_amount_from_stripe(2424, 'USD'), Decimal(24.24))
    assert isclose(get_amount_from_stripe(4242, 'USD'), Decimal(42.42))

    assert get_amount_from_stripe(1, 'JPY') == Decimal(1)
    assert get_amount_from_stripe(1, 'jpy') == Decimal(1)
Exemple #2
0
def test_get_amount_from_stripe():
    assert get_amount_from_stripe(100, "USD") == Decimal(1)
    assert get_amount_from_stripe(100, "usd") == Decimal(1)

    assert isclose(get_amount_from_stripe(1, "USD"), Decimal(0.01))
    assert isclose(get_amount_from_stripe(2424, "USD"), Decimal(24.24))
    assert isclose(get_amount_from_stripe(4242, "USD"), Decimal(42.42))

    assert get_amount_from_stripe(1, "JPY") == Decimal(1)
    assert get_amount_from_stripe(1, "jpy") == Decimal(1)
Exemple #3
0
def test_get_amount_from_stripe():
    assert get_amount_from_stripe(100, "USD") == Decimal(1)
    assert get_amount_from_stripe(100, "usd") == Decimal(1)

    assert isclose(get_amount_from_stripe(1, "USD"), Decimal(0.01))
    assert isclose(get_amount_from_stripe(2424, "USD"), Decimal(24.24))
    assert isclose(get_amount_from_stripe(4242, "USD"), Decimal(42.42))

    assert get_amount_from_stripe(1, "JPY") == Decimal(1)
    assert get_amount_from_stripe(1, "jpy") == Decimal(1)
def test_get_amount_from_stripe():
    assert get_amount_from_stripe(100, 'USD') == Decimal(1)
    assert get_amount_from_stripe(100, 'usd') == Decimal(1)

    assert isclose(
        get_amount_from_stripe(1, 'USD'), Decimal(0.01))
    assert isclose(
        get_amount_from_stripe(2424, 'USD'), Decimal(24.24))
    assert isclose(
        get_amount_from_stripe(4242, 'USD'), Decimal(42.42))

    assert get_amount_from_stripe(1, 'JPY') == Decimal(1)
    assert get_amount_from_stripe(1, 'jpy') == Decimal(1)