Last change
on this file since 73 was 73, checked in by Bart Vastenhouw, 3 years ago |
Fix for IssueValue hashcode.
|
File size:
671 bytes
|
Line | |
---|
1 | import unittest
|
---|
2 | from decimal import Decimal
|
---|
3 |
|
---|
4 | from geniusweb.issuevalue.ValueDeserializer import ValueDeserializer
|
---|
5 | from geniusweb.issuevalue.DiscreteValue import DiscreteValue
|
---|
6 | from geniusweb.issuevalue.NumberValue import NumberValue
|
---|
7 |
|
---|
8 | class 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.