Module ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias Assign NameStore Call NameLoad Assign NameStore Call NameLoad ClassDef bases NameLoad body Assign NameStore ListLoad Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return Str decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad Str Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Return Str decorator_list decorator_list ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr ListLoad Str Str Str Str Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call NameLoad Dict Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str Assign NameStore Call AttributeLoad Str attr keyword Call NameLoad Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Dict Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Dict Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Dict Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Dict Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Dict Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Str Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad Assign NameStore Call NameLoad AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Dict Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A __future__ unicode_literals N/A json django.contrib.auth get_user_model django.core.exceptions ImproperlyConfigured django.core.urlresolvers reverse django.test TestCase RequestFactory test_utils TestCaseUtils compat urlparse parse_qs urlencode models get_application_model Grant AccessToken settings oauth2_settings views ScopedProtectedResourceView ReadWriteScopedResourceView N/A Application N/A get_application_model N/A UserModel N/A get_user_model ScopeResourceView N/A ScopedProtectedResourceView N/A N/A required_scopes N/A scope1 get N/A N/A self request N/A args kwargs N/A N/A This is a protected resource N/A N/A MultiScopeResourceView N/A ScopedProtectedResourceView N/A N/A required_scopes N/A scope1 scope2 get N/A N/A self request N/A args kwargs N/A N/A This is a protected resource N/A N/A ReadWriteResourceView N/A ReadWriteScopedResourceView N/A get N/A N/A self request N/A args kwargs N/A N/A This is a read protected resource N/A post N/A N/A self request N/A args kwargs N/A N/A This is a write protected resource N/A N/A BaseTest N/A TestCaseUtils TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self factory N/A RequestFactory N/A N/A self test_user N/A N/A N/A UserModel objects create_user test_user test@user.com 123456 N/A N/A self dev_user N/A N/A N/A UserModel objects create_user dev_user dev@user.com 123456 N/A N/A self application N/A Application name Test Application redirect_uris http://localhost http://example.com http://example.it user N/A self dev_user client_type N/A Application CLIENT_CONFIDENTIAL authorization_grant_type N/A Application GRANT_AUTHORIZATION_CODE N/A N/A N/A N/A self application save N/A N/A oauth2_settings _SCOPES N/A read write scope1 scope2 scope3 N/A N/A oauth2_settings READ_SCOPE read N/A N/A oauth2_settings WRITE_SCOPE write N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A self application delete N/A N/A N/A N/A self test_user delete N/A N/A N/A N/A self dev_user delete N/A N/A TestScopesQueryParameterBackwardsCompatibility N/A BaseTest N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestScopesQueryParameterBackwardsCompatibility self setUp N/A N/A oauth2_settings _SCOPES N/A read write N/A N/A oauth2_settings _DEFAULT_SCOPES N/A read write N/A test_scopes_query_parameter_is_supported_on_post N/A N/A self N/A N/A N/A 
        Tests support for plural `scopes` query parameter on POST requests.

         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scopes redirect_uri response_type allow N/A N/A self application client_id random_state_string read write http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A grant N/A N/A N/A Grant objects get code authorization_code N/A N/A N/A self assertEqual N/A grant scope read write N/A test_scopes_query_parameter_is_supported_on_get N/A N/A self N/A N/A N/A 
        Tests support for plural `scopes` query parameter on GET requests.

         N/A N/A N/A N/A self client login username test_user password 123456 N/A query_string N/A urlencode N/A client_id state scopes redirect_uri response_type N/A N/A self application client_id random_state_string read write http://example.it code N/A url N/A N/A {url}?{qs} format url N/A reverse oauth2_provider:authorize qs query_string N/A response N/A N/A N/A self client get url N/A N/A N/A self assertEqual N/A response status_code 200 N/A N/A N/A self assertIn form N/A response context N/A form N/A N/A response context N/A form N/A N/A N/A self assertEqual N/A N/A N/A form N/A scope value read write N/A N/A TestScopesSave N/A BaseTest N/A test_scopes_saved_in_grant N/A N/A self N/A N/A N/A 
        Test scopes are properly saved in grant
         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scope1 scope2 http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A grant N/A N/A N/A Grant objects get code authorization_code N/A N/A N/A self assertEqual N/A grant scope scope1 scope2 N/A test_scopes_save_in_access_token N/A N/A self N/A N/A N/A 
        Test scopes are properly saved in access token
         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scope1 scope2 http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A token_request_data N/A grant_type code redirect_uri authorization_code authorization_code http://example.it N/A auth_headers N/A N/A self get_basic_auth_header N/A N/A self application client_id N/A N/A self application client_secret N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:token data token_request_data auth_headers N/A content N/A N/A json loads N/A N/A N/A response content decode utf-8 N/A access_token N/A content N/A access_token N/A at N/A N/A N/A AccessToken objects get token access_token N/A N/A N/A self assertEqual N/A at scope scope1 scope2 N/A N/A TestScopesProtection N/A BaseTest N/A test_scopes_protection_valid N/A N/A self N/A N/A N/A 
        Test access to a scope protected resource with correct scopes provided
         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scope1 scope2 http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A token_request_data N/A grant_type code redirect_uri authorization_code authorization_code http://example.it N/A auth_headers N/A N/A self get_basic_auth_header N/A N/A self application client_id N/A N/A self application client_secret N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:token data token_request_data auth_headers N/A content N/A N/A json loads N/A N/A N/A response content decode utf-8 N/A access_token N/A content N/A access_token N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory get /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A ScopeResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual response This is a protected resource N/A test_scopes_protection_fail N/A N/A self N/A N/A N/A 
        Test access to a scope protected resource with wrong scopes provided
         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scope2 http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A token_request_data N/A grant_type code redirect_uri authorization_code authorization_code http://example.it N/A auth_headers N/A N/A self get_basic_auth_header N/A N/A self application client_id N/A N/A self application client_secret N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:token data token_request_data auth_headers N/A content N/A N/A json loads N/A N/A N/A response content decode utf-8 N/A access_token N/A content N/A access_token N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory get /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A ScopeResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual N/A response status_code 403 N/A test_multi_scope_fail N/A N/A self N/A N/A N/A 
        Test access to a multi-scope protected resource with wrong scopes provided
         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scope1 scope3 http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A token_request_data N/A grant_type code redirect_uri authorization_code authorization_code http://example.it N/A auth_headers N/A N/A self get_basic_auth_header N/A N/A self application client_id N/A N/A self application client_secret N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:token data token_request_data auth_headers N/A content N/A N/A json loads N/A N/A N/A response content decode utf-8 N/A access_token N/A content N/A access_token N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory get /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A MultiScopeResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual N/A response status_code 403 N/A test_multi_scope_valid N/A N/A self N/A N/A N/A 
        Test access to a multi-scope protected resource with correct scopes provided
         N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scope1 scope2 http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A token_request_data N/A grant_type code redirect_uri authorization_code authorization_code http://example.it N/A auth_headers N/A N/A self get_basic_auth_header N/A N/A self application client_id N/A N/A self application client_secret N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:token data token_request_data auth_headers N/A content N/A N/A json loads N/A N/A N/A response content decode utf-8 N/A access_token N/A content N/A access_token N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory get /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A MultiScopeResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual response This is a protected resource N/A N/A TestReadWriteScope N/A BaseTest N/A get_access_token N/A N/A self scopes N/A N/A N/A N/A N/A N/A self client login username test_user password 123456 N/A authcode_data N/A client_id state scope redirect_uri response_type allow N/A N/A self application client_id random_state_string scopes http://example.it code True N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:authorize data authcode_data N/A query_dict N/A parse_qs N/A N/A urlparse N/A response N/A Location query N/A authorization_code N/A N/A N/A query_dict N/A code pop N/A token_request_data N/A grant_type code redirect_uri authorization_code authorization_code http://example.it N/A auth_headers N/A N/A self get_basic_auth_header N/A N/A self application client_id N/A N/A self application client_secret N/A response N/A N/A N/A self client post N/A reverse oauth2_provider:token data token_request_data auth_headers N/A content N/A N/A json loads N/A N/A N/A response content decode utf-8 N/A N/A content N/A access_token N/A test_improperly_configured N/A N/A self N/A N/A N/A N/A oauth2_settings _SCOPES N/A scope1 N/A request N/A N/A N/A self factory get /fake N/A view N/A N/A ReadWriteResourceView as_view N/A N/A N/A self assertRaises ImproperlyConfigured view request N/A N/A oauth2_settings _SCOPES N/A read write N/A N/A oauth2_settings READ_SCOPE ciccia N/A view N/A N/A ReadWriteResourceView as_view N/A N/A N/A self assertRaises ImproperlyConfigured view request N/A test_properly_configured N/A N/A self N/A N/A N/A N/A oauth2_settings _SCOPES N/A scope1 N/A request N/A N/A N/A self factory get /fake N/A view N/A N/A ReadWriteResourceView as_view N/A N/A N/A self assertRaises ImproperlyConfigured view request N/A N/A oauth2_settings _SCOPES N/A read write N/A N/A oauth2_settings READ_SCOPE ciccia N/A view N/A N/A ReadWriteResourceView as_view N/A N/A N/A self assertRaises ImproperlyConfigured view request N/A test_has_read_scope N/A N/A self N/A N/A N/A access_token N/A N/A self get_access_token read N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory get /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A ReadWriteResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual response This is a read protected resource N/A test_no_read_scope N/A N/A self N/A N/A N/A access_token N/A N/A self get_access_token scope1 N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory get /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A ReadWriteResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual N/A response status_code 403 N/A test_has_write_scope N/A N/A self N/A N/A N/A access_token N/A N/A self get_access_token write N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory post /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A ReadWriteResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual response This is a write protected resource N/A test_no_write_scope N/A N/A self N/A N/A N/A access_token N/A N/A self get_access_token scope1 N/A auth_headers N/A HTTP_AUTHORIZATION N/A Bearer  access_token N/A request N/A N/A N/A self factory post /fake-resource auth_headers N/A N/A request user N/A self test_user N/A view N/A N/A ReadWriteResourceView as_view N/A response N/A view request N/A N/A N/A self assertEqual N/A response status_code 403 N/A N/A