(self)
| 95 | self.assertEqual(cSerialized, cSerializedTwice) |
| 96 | |
| 97 | def test_serializationDiff(self): |
| 98 | # Sanity check that the serialization code preserves differences |
| 99 | c1 = CAddress() |
| 100 | c1.ip = "1.1.1.1" |
| 101 | c1.port = 8333 |
| 102 | c1.nTime = 1420576401 |
| 103 | |
| 104 | c2 = CAddress() |
| 105 | c2.ip = "1.1.1.2" |
| 106 | c2.port = 8333 |
| 107 | c2.nTime = 1420576401 |
| 108 | |
| 109 | self.assertNotEqual(c1, c2) |
| 110 | |
| 111 | c1Serialized = c1.serialize() |
| 112 | c2Serialized = c2.serialize() |
| 113 | |
| 114 | self.assertNotEqual(c1Serialized, c2Serialized) |
| 115 | |
| 116 | c1Deserialized = CAddress.deserialize(c1Serialized) |
| 117 | c2Deserialized = CAddress.deserialize(c2Serialized) |
| 118 | |
| 119 | self.assertNotEqual(c1Deserialized, c2Deserialized) |
nothing calls this directly
no test coverage detected