Module Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Dict Str Str Assign NameStore Call NameLoad NameLoad Assert CompareEq NameLoad Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Dict With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad ListLoad TupleLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad Assert AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num Assert UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num Assert UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad Expr Call NameLoad NameLoad Str Call Call NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad Expr Call NameLoad NameLoad Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call Call NameLoad NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad Expr Call NameLoad NameLoad Str Call Call NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad Call NameLoad NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list Expr Call NameLoad NameLoad Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad ListLoad TupleLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad Assert AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num Assert UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad Expr Call NameLoad NameLoad Str Call Call NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad Expr Call NameLoad NameLoad Str Call Call NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list
N/A N/A json N/A pytest mock Mock patch tornado.web Application tornado testing koi base koi.exceptions HTTPError koi.auth auth_required authorized _get_token util return_fake_future test_get_token N/A N/A N/A N/A N/A request N/A Mock N/A N/A request headers N/A Authorization token12345 N/A result N/A _get_token request N/A N/A result token12345 N/A test_get_token_no_token N/A N/A N/A N/A N/A request N/A Mock N/A N/A request headers N/A N/A N/A N/A pytest raises HTTPError N/A N/A N/A _get_token request N/A _AuthenticateBase N/A object N/A assert_status_code N/A N/A self expected response N/A N/A N/A msg N/A N/A Expected {} status code, got {} format expected N/A response code N/A N/A N/A self assertEqual expected N/A response code msg N/A assert_json_error N/A N/A self response N/A N/A N/A result N/A N/A json loads N/A response body N/A N/A N/A self assertIn errors result N/A get_app N/A N/A self N/A N/A N/A N/A Application N/A N/A / N/A self Handler N/A test_get_decorated_method_with_token N/A N/A self N/A N/A N/A Test decorated GET method when there is an auth token N/A N/A self is_valid True N/A test_token token N/A response N/A N/A self fetch / headers N/A Authorization test_token N/A N/A N/A self assert_status_code 200 response N/A N/A N/A self get_method called N/A test_get_decorated_method_with_invalid_token N/A N/A self logging N/A N/A N/A Test decorated GET method when there is an auth invalid token N/A test_token token N/A N/A self is_valid False N/A response N/A N/A self fetch / headers N/A Authorization test_token N/A N/A N/A self assert_status_code 401 response N/A N/A N/A self assert_json_error response N/A N/A N/A N/A logging warning call_count 1 N/A N/A N/A N/A self get_method called N/A N/A patch koi.auth.logging test_decorated_method_without_token N/A N/A self logging N/A N/A N/A Test the decorated method when there is not an auth token N/A response N/A N/A self fetch / N/A N/A N/A self assert_status_code 401 response N/A N/A N/A self assert_json_error response N/A N/A N/A N/A logging warning call_count 1 N/A N/A N/A N/A self get_method called N/A N/A patch koi.auth.logging N/A TestAuthenticateMethodDecorator N/A _AuthenticateBase N/A testing AsyncHTTPTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self get_method N/A Mock return_value None N/A N/A N/A self get_method __name__ get Handler N/A N/A base BaseHandler N/A N/A N/A fake_validator N/A N/A token N/A N/A N/A N/A self is_valid N/A return_fake_future N/A N/A setattr Handler get N/A N/A auth_required fake_validator N/A self get_method N/A N/A self Handler Handler N/A N/A N/A N/A super TestAuthenticateMethodDecorator self setUp N/A N/A TestAuthenticateClassDecorator N/A _AuthenticateBase N/A testing AsyncHTTPTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self get_method N/A Mock return_value None N/A N/A N/A self get_method __name__ get Handler N/A N/A base BaseHandler N/A not_a_http_verb N/A N/A self N/A N/A N/A N/A N/A fake_validator N/A N/A token N/A N/A N/A N/A self is_valid N/A return_fake_future N/A N/A setattr Handler get N/A self get_method N/A N/A self Handler N/A N/A auth_required fake_validator Handler N/A N/A N/A N/A super TestAuthenticateClassDecorator self setUp N/A test_only_http_verbs_decorated N/A N/A self N/A N/A N/A request N/A Mock N/A handler N/A N/A self Handler N/A N/A self get_app request N/A N/A N/A handler not_a_http_verb N/A N/A N/A request called N/A N/A TestAsyncAuthenticateMethodDecorator N/A _AuthenticateBase N/A testing AsyncHTTPTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self get_method N/A Mock fake_coroutine N/A N/A self N/A N/A N/A None N/A return_fake_future N/A N/A N/A self get_method side_effect fake_coroutine N/A N/A N/A self get_method __name__ get Handler N/A N/A base BaseHandler N/A N/A N/A fake_validator N/A N/A token N/A N/A N/A N/A self is_valid N/A return_fake_future N/A N/A setattr Handler get N/A N/A auth_required fake_validator N/A self get_method N/A N/A self Handler Handler N/A N/A N/A N/A super TestAsyncAuthenticateMethodDecorator self setUp N/A N/A TestAsyncWrongDecoratorOrder N/A N/A testing AsyncHTTPTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self get_method N/A Mock fake_validator N/A N/A token N/A N/A N/A N/A self is_valid N/A return_fake_future fake_coroutine N/A N/A self N/A N/A N/A None N/A return_fake_future N/A auth_required fake_validator N/A N/A N/A self get_method side_effect fake_coroutine N/A N/A N/A self get_method __name__ get Handler N/A N/A base BaseHandler N/A N/A N/A N/A N/A setattr Handler get N/A self get_method N/A N/A self Handler Handler N/A N/A N/A N/A super TestAsyncWrongDecoratorOrder self setUp N/A get_app N/A N/A self N/A N/A N/A N/A Application N/A N/A / N/A self Handler N/A assert_status_code N/A N/A self expected response N/A N/A N/A msg N/A N/A Expected {} status code, got {} format expected N/A response code N/A N/A N/A self assertEqual expected N/A response code msg N/A test_get_decorated_method_with_token N/A N/A self N/A N/A N/A Test decorated GET method when there is an auth token N/A N/A self is_valid True N/A test_token token N/A response N/A N/A self fetch / headers N/A Authorization test_token N/A N/A N/A self assert_status_code 500 response N/A N/A N/A self get_method called N/A N/A _AuthorizeBase N/A _AuthenticateBase N/A test_get_decorated_method_with_invalid_token N/A N/A self logging N/A N/A N/A Test decorated GET method when there is invalid authorization N/A test_token token N/A N/A self is_valid False N/A response N/A N/A self fetch / headers N/A Authorization test_token N/A N/A N/A self assert_status_code 403 response N/A N/A N/A self assert_json_error response N/A N/A N/A N/A logging warning call_count 1 N/A N/A N/A N/A self get_method called N/A N/A patch koi.auth.logging N/A TestAuthorizeMethodDecorator N/A _AuthorizeBase N/A testing AsyncHTTPTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self get_method N/A Mock return_value None N/A N/A N/A self get_method __name__ get Handler N/A N/A base BaseHandler N/A N/A N/A fake_validator N/A N/A token N/A N/A N/A N/A self is_valid N/A return_fake_future N/A N/A setattr Handler get N/A N/A authorized fake_validator N/A self get_method N/A N/A self Handler Handler N/A N/A N/A N/A super TestAuthorizeMethodDecorator self setUp N/A N/A TestAsyncAuthorizeMethodDecorator N/A _AuthorizeBase N/A testing AsyncHTTPTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self get_method N/A Mock fake_coroutine N/A N/A self N/A N/A N/A None N/A return_fake_future N/A N/A N/A self get_method side_effect fake_coroutine N/A N/A N/A self get_method __name__ get Handler N/A N/A base BaseHandler N/A N/A N/A fake_validator N/A N/A token N/A N/A N/A N/A self is_valid N/A return_fake_future N/A N/A setattr Handler get N/A N/A authorized fake_validator N/A self get_method N/A N/A self Handler Handler N/A N/A N/A N/A super TestAsyncAuthorizeMethodDecorator self setUp N/A N/A