MockWebServer¶
- class lsst.ts.authorize.MockWebServer(token: str)¶
Bases:
object
Mock Web Server for unit tests.
Methods Summary
get_token_handler
(request)POST handler coroutine for get token requests to the mock REST server.
post_request_handler
(request)POST handler coroutine for the mock REST server.
put_request_handler
(request)PUT handler coroutine for the mock REST server.
request_handler
(request)General handler coroutine for the mock REST server.
verify_http_status
(request)Verify that the requester has authenticated itself.
Methods Documentation
- async get_token_handler(request: Request) Response ¶
POST handler coroutine for get token requests to the mock REST server.
- Parameters
- request
web.Request
The web request to process.
- request
- Raises
- web_exceptions.HTTPBadRequest
In case the provided credentials are incorrect.
- async post_request_handler(request: Request) Response ¶
POST handler coroutine for the mock REST server.
- Parameters
- request
web.Request
The web request to process.
- request
- async put_request_handler(request: Request) Response ¶
PUT handler coroutine for the mock REST server.
- Parameters
- request
web.Request
The web request to process.
- request
- async request_handler(request: Request) Response ¶
General handler coroutine for the mock REST server.
- Parameters
- request
web.Request
The web request to process.
- request