From f76311d03e6a3da985fc38525509679f5f23c74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sa=C5=82aban?= Date: Mon, 9 Sep 2019 13:57:03 +0200 Subject: [PATCH] Test hash equality --- tests/test_address.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_address.py b/tests/test_address.py index fe4e4f9..7294af7 100644 --- a/tests/test_address.py +++ b/tests/test_address.py @@ -16,6 +16,7 @@ class Tests(object): self.assertEqual(str(a), self.addr) self.assertEqual(a.spend_key(), self.psk) self.assertEqual(a.view_key(), self.pvk) + self.assertEqual(hash(a), hash(self.addr)) ia = IntegratedAddress(self.iaddr) self.assertEqual(ia.payment_id(), self.pid) @@ -41,6 +42,7 @@ class Tests(object): self.assertEqual(a, a2) self.assertEqual(a, self.addr) self.assertEqual(self.addr, a) + self.assertEqual(hash(a), hash(self.addr)) self.assertEqual(a.is_mainnet(), self.mainnet) self.assertEqual(a.is_testnet(), self.testnet) self.assertEqual(a.is_stagenet(), self.stagenet) @@ -54,6 +56,7 @@ class Tests(object): self.assertEqual(ia, ia2) self.assertEqual(ia, self.iaddr) self.assertEqual(self.iaddr, ia) + self.assertEqual(hash(ia), hash(self.iaddr)) self.assertEqual(ia.is_mainnet(), self.mainnet) self.assertEqual(ia.is_testnet(), self.testnet) self.assertEqual(ia.is_stagenet(), self.stagenet) @@ -71,6 +74,7 @@ class Tests(object): self.assertEqual(sa, sa2) self.assertEqual(sa, self.subaddr) self.assertEqual(self.subaddr, sa) + self.assertEqual(hash(sa), hash(self.subaddr)) self.assertEqual(sa.is_mainnet(), self.mainnet) self.assertEqual(sa.is_testnet(), self.testnet) self.assertEqual(sa.is_stagenet(), self.stagenet)