(self)
| 1301 | self.assertNotEqual(id(h1._outer), id(h2._outer)) |
| 1302 | |
| 1303 | def test_equality(self): |
| 1304 | # Testing if the copy has the same digests. |
| 1305 | h1 = hmac.HMAC(b"key", digestmod="sha256") |
| 1306 | h1.update(b"some random text") |
| 1307 | h2 = h1.copy() |
| 1308 | self.assertEqual(h1.digest(), h2.digest()) |
| 1309 | self.assertEqual(h1.hexdigest(), h2.hexdigest()) |
| 1310 | |
| 1311 | def test_equality_new(self): |
| 1312 | # Testing if the copy has the same digests with hmac.new(). |