(self)
| 33 | return handler |
| 34 | |
| 35 | def test_do_get_success(self): |
| 36 | handler = self._make_handler("/callback?code=abc123&state=xyz") |
| 37 | handler.do_GET() |
| 38 | # Should set callback_url and not error |
| 39 | self.assertIsNone(_CallbackHandler.error) |
| 40 | self.assertTrue( |
| 41 | _CallbackHandler.callback_url.endswith("/callback?code=abc123&state=xyz") |
| 42 | ) |
| 43 | handler.send_response.assert_called_with(200) |
| 44 | handler.send_header.assert_called_with("Content-Type", "text/html") |
| 45 | handler.end_headers.assert_called() |
| 46 | output = handler.wfile.getvalue().decode() |
| 47 | self.assertIn("Login successful", output) |
| 48 | |
| 49 | def test_do_get_error(self): |
| 50 | handler = self._make_handler( |
nothing calls this directly
no test coverage detected