Last change
on this file since 81 was 81, checked in by Bart Vastenhouw, 3 years ago |
Added python timedependent parties (conceder, hardliner, etc)
|
File size:
681 bytes
|
Rev | Line | |
---|
[81] | 1 | import unittest
|
---|
| 2 |
|
---|
| 3 | from pyson.ObjectMapper import ObjectMapper
|
---|
| 4 |
|
---|
| 5 | from geniusweb.inform.Inform import Inform
|
---|
| 6 | from geniusweb.inform.YourTurn import YourTurn
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | class YourTurnTest(unittest.TestCase):
|
---|
| 10 |
|
---|
| 11 | pyson=ObjectMapper()
|
---|
| 12 | yourturn = YourTurn()
|
---|
| 13 | yourturnjson:dict= {'YourTurn': {}}
|
---|
| 14 |
|
---|
| 15 |
|
---|
| 16 | def testSerializeDeserialize(self):
|
---|
| 17 |
|
---|
| 18 | print(str(self.pyson.toJson(self.yourturn)))
|
---|
| 19 | self.assertEqual(self.yourturnjson, self.pyson.toJson(self.yourturn))
|
---|
| 20 |
|
---|
| 21 | def testDeserialize(self):
|
---|
| 22 | self.assertEqual(self.yourturn, self.pyson.parse(self.yourturnjson, Inform))
|
---|
| 23 |
|
---|
| 24 | def testrepr(self):
|
---|
| 25 | self.assertEqual(repr(self.yourturn),"YourTurn") |
---|
Note:
See
TracBrowser
for help on using the repository browser.