(self)
| 1714 | |
| 1715 | |
| 1716 | def test_bad_server_hostname(self): |
| 1717 | ctx = ssl.create_default_context() |
| 1718 | with self.assertRaises(ValueError): |
| 1719 | ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), |
| 1720 | server_hostname="") |
| 1721 | with self.assertRaises(ValueError): |
| 1722 | ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), |
| 1723 | server_hostname=".example.org") |
| 1724 | with self.assertRaises(TypeError): |
| 1725 | ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), |
| 1726 | server_hostname="example.org\x00evil.com") |
| 1727 | |
| 1728 | |
| 1729 | class MemoryBIOTests(unittest.TestCase): |
nothing calls this directly
no test coverage detected