def test_check_amount_exceed_raise(self, amount):
     with pytest.raises(
         ValueError,
         match="Value of '{}' must represent a positive "
         "number and the max valid value is 922337203685.4775807.".format(amount),
     ):
         check_amount(amount)
예제 #2
0
 def test_check_amount_bad_precision_raise(self, amount):
     with pytest.raises(
             ValueError,
             match="must have at most 7 digits after the decimal.".format(
                 amount),
     ):
         check_amount(amount)
 def test_check_amount_type_raise(self, amount):
     with pytest.raises(
         TypeError, match="amount should be type of {} or {}.".format(str, Decimal)
     ):
         check_amount(amount)
 def test_check_amount(self, amount):
     check_amount(amount)