source: geniuswebcore/test/geniusweb/issuevalue/ValueDeserializerTest.py@ 88

Last change on this file since 88 was 88, checked in by Bart Vastenhouw, 3 years ago

Added python SimpleRunner GUI

File size: 671 bytes
Line 
1import unittest
2from decimal import Decimal
3
4from geniusweb.issuevalue.ValueDeserializer import ValueDeserializer
5from geniusweb.issuevalue.DiscreteValue import DiscreteValue
6from geniusweb.issuevalue.NumberValue import NumberValue
7
8class ValueDeserializerTest(unittest.TestCase):
9
10 val = ValueDeserializer()
11
12 def testValueDeserializer(self):
13 #self.assertEqual(DiscreteValue(123),self.val.deserialize(123,1))
14 self.assertEqual(DiscreteValue("123"),self.val.deserialize("123",1))
15 self.assertEqual(NumberValue(Decimal(123)), self.val.deserialize(123,1))
16 self.assertRaises(ValueError,lambda: self.val.deserialize([1,2,3],1))
Note: See TracBrowser for help on using the repository browser.