Module Expr Str ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias ClassDef bases NameLoad NameLoad NameLoad NameLoad body Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad kwarg body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Dict If Call NameLoad Call AttributeLoad NameLoad attr Str Dict body Assign SubscriptStore NameLoad Index Str Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Str If BoolOpAnd NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad orelse Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad NameLoad Return NameLoad decorator_list Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
    rauth.test_service_oauth2
    -------------------------

    Test suite for rauth.service.OAuth2Service.
 base RauthTestCase test_service HttpMixin RequestMixin ServiceMixin rauth.service OAuth2Service rauth.session OAUTH2_DEFAULT_TIMEOUT OAuth2Session rauth.compat parse_qsl is_basestring copy deepcopy mock patch N/A requests N/A json N/A pickle OAuth2ServiceTestCase N/A RauthTestCase RequestMixin ServiceMixin HttpMixin N/A N/A client_id 000 N/A client_secret 111 N/A access_token 123 setUp N/A N/A self N/A N/A N/A N/A N/A RauthTestCase setUp self N/A N/A self access_token_url https://example.com/access N/A N/A self authorize_url https://example.com/authorize N/A N/A self base_url https://example/api/ N/A N/A self service N/A OAuth2Service N/A self client_id N/A self client_secret access_token_url N/A self access_token_url authorize_url N/A self authorize_url base_url N/A self base_url N/A N/A self session N/A N/A N/A self service get_session N/A self access_token N/A N/A N/A self session request N/A self fake_request N/A N/A N/A self service get_session N/A self fake_get_session N/A fake_request N/A N/A self method url mock_request bearer_auth N/A False kwargs N/A N/A N/A mock_request return_value N/A self response N/A url N/A N/A N/A self session _set_url url N/A service N/A OAuth2Service N/A self client_id N/A self client_secret access_token_url N/A self access_token_url authorize_url N/A self authorize_url base_url N/A self base_url N/A session N/A N/A service get_session N/A self access_token N/A r N/A N/A session request method url bearer_auth bearer_auth N/A deepcopy kwargs N/A N/A N/A kwargs setdefault params N/A N/A N/A is_basestring N/A N/A kwargs get params N/A N/A N/A N/A kwargs N/A params N/A dict N/A parse_qsl N/A kwargs N/A params N/A N/A bearer_auth N/A N/A self access_token None N/A N/A auth N/A N/A N/A mock_request call_args N/A 1 N/A auth N/A N/A N/A self assertEqual N/A auth access_token N/A self access_token N/A N/A kwargs N/A auth auth N/A N/A N/A N/A N/A kwargs N/A params update N/A access_token N/A self access_token N/A N/A N/A mock_request assert_called_with method url timeout OAUTH2_DEFAULT_TIMEOUT kwargs N/A r N/A N/A N/A patch object N/A requests Session request fake_get_session N/A N/A self token N/A None N/A N/A N/A self session N/A test_get_session N/A N/A self N/A N/A N/A s N/A N/A N/A self service get_session N/A N/A N/A self assertIsInstance s OAuth2Session N/A test_get_authorize_url N/A N/A self N/A N/A N/A url N/A N/A N/A self service get_authorize_url N/A expected_fmt https://example.com/authorize?client_id={0} N/A N/A N/A self assertEqual url N/A N/A expected_fmt format N/A N/A self service client_id N/A test_get_raw_access_token N/A N/A self N/A N/A N/A resp access_token=123&expires_in=3600&refresh_token=456 N/A N/A N/A self response content resp N/A r N/A N/A N/A self service get_raw_access_token N/A N/A N/A self assertEqual N/A r content resp N/A test_get_raw_access_token_with_params N/A N/A self N/A N/A N/A resp access_token=123&expires_in=3600&refresh_token=456 N/A N/A N/A self response content resp N/A r N/A N/A N/A self service get_raw_access_token params N/A a b N/A N/A N/A self assertEqual N/A r content resp N/A test_get_access_token N/A N/A self N/A N/A N/A N/A N/A self response content access_token=123&expires_in=3600&refresh_token=456 N/A access_token N/A N/A N/A self service get_access_token N/A N/A N/A self assertEqual access_token 123 N/A test_get_access_token_with_json_decoder N/A N/A self N/A N/A N/A N/A N/A self response content N/A N/A json dumps N/A access_token expires_in refresh_token 123 3600 456 N/A access_token N/A N/A N/A self service get_access_token decoder N/A json loads N/A N/A N/A self assertEqual access_token 123 N/A test_request_with_bearer_auth N/A N/A self N/A N/A N/A r N/A N/A N/A self session request GET http://example.com/ bearer_auth True N/A N/A N/A self assert_ok r N/A test_get_auth_session N/A N/A self N/A N/A N/A N/A N/A self response content access_token=123&expires_in=3600&refresh_token=456 N/A s N/A N/A N/A self service get_auth_session N/A N/A N/A self assertIsInstance s OAuth2Session N/A test_get_auth_session_with_access_token_response N/A N/A self N/A N/A N/A N/A N/A self response content access_token=123&expires_in=3600&refresh_token=456 N/A s N/A N/A N/A self service get_auth_session N/A N/A N/A self assertIsNotNone N/A s access_token_response N/A test_pickle_session N/A N/A self N/A N/A N/A session N/A N/A pickle loads N/A N/A pickle dumps N/A self session N/A N/A session request N/A self fake_request N/A r N/A N/A session request GET http://example.com/ bearer_auth True N/A N/A N/A self assert_ok r N/A N/A