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

Last change on this file since 100 was 100, checked in by ruud, 20 months ago

python installs also wheel to avoid error messages

File size: 671 bytes
RevLine 
[100]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.