Ejemplo n.º 1
0
def test_with_integer_containing_decimals_format():
    """Integer_containing_decimals format, should be divided by 100."""
    test = CastToDecimal()(
        '123456789',
        'integer_containing_decimals',
    )
    assert test.unwrap() == target
Ejemplo n.º 2
0
def test_string_with_no_period_nor_comma():
    """Test an integer number will nicely become a decimal."""
    test = CastToDecimal()('123456789')
    assert is_successful(test)
    assert test.unwrap() == Decimal('123456789')