(self)
| 47 | self.assertIn("Login successful", output) |
| 48 | |
| 49 | def test_do_get_error(self): |
| 50 | handler = self._make_handler( |
| 51 | "/callback?error=access_denied&error_description=User+denied+access" |
| 52 | ) |
| 53 | handler.do_GET() |
| 54 | # Should set error and not callback_url |
| 55 | self.assertEqual(_CallbackHandler.error, "access_denied") |
| 56 | handler.send_response.assert_called_with(400) |
| 57 | handler.send_header.assert_called_with("Content-Type", "text/html") |
| 58 | handler.end_headers.assert_called() |
| 59 | output = handler.wfile.getvalue().decode() |
| 60 | self.assertIn("Login failed", output) |
| 61 | self.assertIn("User denied access", output) |
| 62 | |
| 63 | |
| 64 | class TestAuthMethods(unittest.TestCase): |
nothing calls this directly
no test coverage detected