(self)
| 16 | """Test secrets.compare_digest function.""" |
| 17 | |
| 18 | def test_equal(self): |
| 19 | # Test compare_digest functionality with equal (byte/text) strings. |
| 20 | for s in ("a", "bcd", "xyz123"): |
| 21 | a = s*100 |
| 22 | b = s*100 |
| 23 | self.assertTrue(secrets.compare_digest(a, b)) |
| 24 | self.assertTrue(secrets.compare_digest(a.encode('utf-8'), b.encode('utf-8'))) |
| 25 | |
| 26 | def test_unequal(self): |
| 27 | # Test compare_digest functionality with unequal (byte/text) strings. |
nothing calls this directly
no test coverage detected