(self)
| 304 | super(BasicAuthTests, self).tearDown() |
| 305 | |
| 306 | def test_basic_auth_success(self): |
| 307 | ah = urllib.request.HTTPBasicAuthHandler() |
| 308 | ah.add_password(self.REALM, self.server_url, self.USER, self.PASSWD) |
| 309 | urllib.request.install_opener(urllib.request.build_opener(ah)) |
| 310 | try: |
| 311 | self.assertTrue(urllib.request.urlopen(self.server_url)) |
| 312 | except urllib.error.HTTPError: |
| 313 | self.fail("Basic auth failed for the url: %s" % self.server_url) |
| 314 | |
| 315 | def test_basic_auth_httperror(self): |
| 316 | ah = urllib.request.HTTPBasicAuthHandler() |
nothing calls this directly
no test coverage detected