nuropb_gw.testing.stubs

Module Contents

Classes

PublicHandler

PrivateHandler

Functions

create_test_user_info

authorise_from_token

gateway_server

websocket_client

Returns an asynchronous websocket client and instantiates a websocket server

read_ws_message

Data

logger

TEST_AUTH_TOKENS

_test_token_cache

_test_user_id_cache

API

nuropb_gw.testing.stubs.logger

None

nuropb_gw.testing.stubs.TEST_AUTH_TOKENS

[‘accesstokentest1’, ‘accesstokentest2’, ‘accesstokentest3’]

nuropb_gw.testing.stubs._test_token_cache: Dict[str, Any]

None

nuropb_gw.testing.stubs._test_user_id_cache: Dict[str, Any]

None

class nuropb_gw.testing.stubs.PublicHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)

Bases: nuropb_gw.handlers.base_handler.BaseMixin

_default_page: str

None

initialize(**kwargs) None
async get()
class nuropb_gw.testing.stubs.PrivateHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)

Bases: nuropb_gw.testing.stubs.PublicHandler

initialize(**kwargs) None
async get()
nuropb_gw.testing.stubs.create_test_user_info(token: str) Dict[str, Any]
nuropb_gw.testing.stubs.authorise_from_token(token) Optional[Dict[str, Any]]
nuropb_gw.testing.stubs.gateway_server(service_name: str, instance_id: str, amqp_url: str) tornado.web.Application
async nuropb_gw.testing.stubs.websocket_client(ws_url, headers=None, cookies=None)

Returns an asynchronous websocket client and instantiates a websocket server

async nuropb_gw.testing.stubs.read_ws_message(conn) Any