Ejemplo n.º 1
0
 def test_value_and_quantity(self):
   # The value/quantity field can be a string, int, or decimal
   self.assertEqual(Decimal('5.03'), gcdomain_test_util.split(value='5.03').value)
   self.assertEqual(Decimal('5.03'), gcdomain_test_util.split(value='5.03').quantity)
   self.assertEqual(Decimal('5.03'), gcdomain_test_util.split(value=Decimal('5.03')).value)
   self.assertEqual(Decimal('5.03'), gcdomain_test_util.split(value=Decimal('5.03')).quantity)
   self.assertEqual(Decimal('10'), gcdomain_test_util.split(value=10).value)
   self.assertEqual(Decimal('10'), gcdomain_test_util.split(value=10).quantity)
Ejemplo n.º 2
0
 def test_repr(self):
   split = gcdomain_test_util.split()
   self.assertEqual(split, eval(repr(split)))