Back to index

python3.2  3.2.2
Public Member Functions
test.test_urllib2net.HTTPSTests Class Reference

List of all members.

Public Member Functions

def test_sni

Detailed Description

Definition at line 331 of file test_urllib2net.py.


Member Function Documentation

Definition at line 333 of file test_urllib2net.py.

00333 
00334     def test_sni(self):
00335         self.skipTest("test disabled - test server needed")
00336         # Checks that Server Name Indication works, if supported by the
00337         # OpenSSL linked to.
00338         # The ssl module itself doesn't have server-side support for SNI,
00339         # so we rely on a third-party test site.
00340         expect_sni = ssl.HAS_SNI
00341         with support.transient_internet("XXX"):
00342             u = urllib.request.urlopen("XXX")
00343             contents = u.readall()
00344             if expect_sni:
00345                 self.assertIn(b"Great", contents)
00346                 self.assertNotIn(b"Unfortunately", contents)
00347             else:
00348                 self.assertNotIn(b"Great", contents)
00349                 self.assertIn(b"Unfortunately", contents)
00350 

Here is the call graph for this function:


The documentation for this class was generated from the following file: