Last change
on this file since 75 was 73, checked in by Bart Vastenhouw, 3 years ago |
Fix for IssueValue hashcode.
|
File size:
637 bytes
|
Line | |
---|
1 | import traceback
|
---|
2 | import unittest
|
---|
3 |
|
---|
4 | from geniusweb.actions.PartyId import PartyId
|
---|
5 | from geniusweb.protocol.ProtocolException import ProtocolException
|
---|
6 |
|
---|
7 |
|
---|
8 | class ProtocolExceptionTest(unittest.TestCase):
|
---|
9 | def testConstructor(self):
|
---|
10 | party = PartyId("test")
|
---|
11 | try:
|
---|
12 | x=1/0
|
---|
13 | except Exception as e:
|
---|
14 | err = ProtocolException("div by zero", party, e)
|
---|
15 |
|
---|
16 | print(err) # BUG ? FEATURE? this does NOT show the cause nor the stacktrace...
|
---|
17 | self.assertTrue(err)
|
---|
18 | self.assertTrue(err.__cause__)
|
---|
19 |
|
---|
20 | def testNullParty(self):
|
---|
21 | ProtocolException("test",None, None)
|
---|
22 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.