(self)
| 18 | |
| 19 | class TestUnsignedAlert(unittest.TestCase): |
| 20 | def test_serialization(self): |
| 21 | alert = CUnsignedAlert() |
| 22 | alert.setCancel = [1, 2, 3] |
| 23 | alert.strComment = b"Comment" |
| 24 | stream = BytesIO() |
| 25 | |
| 26 | alert.stream_serialize(stream) |
| 27 | serialized = BytesIO(stream.getvalue()) |
| 28 | |
| 29 | deserialized = CUnsignedAlert.stream_deserialize(serialized) |
| 30 | self.assertEqual(deserialized, alert) |
| 31 | |
| 32 | |
| 33 | class TestCAlert(unittest.TestCase): |
nothing calls this directly
no test coverage detected