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

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

Fix for IssueValue hashcode.

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.