(self)
| 1931 | |
| 1932 | |
| 1933 | def test_bad_server_hostname(self): |
| 1934 | ctx = ssl.create_default_context() |
| 1935 | with self.assertRaises(ValueError): |
| 1936 | ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), |
| 1937 | server_hostname="") |
| 1938 | with self.assertRaises(ValueError): |
| 1939 | ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), |
| 1940 | server_hostname=".example.org") |
| 1941 | with self.assertRaises(TypeError): |
| 1942 | ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), |
| 1943 | server_hostname="example.org\x00evil.com") |
| 1944 | |
| 1945 | |
| 1946 | class MemoryBIOTests(unittest.TestCase): |
nothing calls this directly
no test coverage detected