Module ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad ClassDef bases NameLoad body Assign NameStore TupleLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Dict Str Str Str Num Num Num decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad NameLoad decorator_list Assign NameStore Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad Str ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str 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 Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A django.test TestCase Client django.http HttpResponse django.core.urlresolvers reverse django.conf.urls patterns url include django.contrib.auth get_user_model rest_framework permissions rest_framework.views APIView oauth2_provider.ext.rest_framework OAuth2Authentication N/A UserModel N/A get_user_model MockView N/A APIView N/A N/A permission_classes N/A N/A permissions IsAuthenticated get N/A N/A self request N/A N/A N/A N/A HttpResponse N/A a b c 1 2 3 N/A N/A OAuth2View N/A MockView N/A N/A authentication_classes N/A OAuth2Authentication N/A N/A urlpatterns N/A patterns N/A url ^oauth2/ N/A include oauth2_provider.urls N/A url ^oauth2-test/$ N/A N/A OAuth2View as_view N/A url ^accounts/ N/A include neurovault.apps.users.urls TestPersonalAccessTokens N/A TestCase N/A N/A urls neurovault.apps.users.tests.test_oauth setUp N/A N/A self N/A N/A N/A N/A self user_password l0n6 l1v3 7h3 k1n6! N/A N/A self user N/A N/A N/A UserModel objects create_user bernardo bernardo@example.com N/A self user_password N/A N/A self client N/A Client N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A self user delete N/A _create_authorization_header N/A N/A self token N/A N/A N/A N/A N/A Bearer {0} format token N/A test_authentication_empty N/A N/A self N/A N/A N/A response N/A N/A N/A self client get /oauth2-test/ N/A N/A N/A self assertEqual N/A response status_code 401 N/A test_authentication_denied N/A N/A self N/A N/A N/A auth N/A N/A self _create_authorization_header fake-token N/A response N/A N/A N/A self client get /oauth2-test/ HTTP_AUTHORIZATION auth N/A N/A N/A self assertEqual N/A response status_code 401 N/A test_authentication_allow N/A N/A self N/A N/A N/A N/A N/A N/A self client login username N/A self user password N/A self user_password N/A response N/A N/A N/A self client post N/A reverse token_create N/A N/A N/A self assertEqual N/A response status_code 302 N/A access_token N/A N/A N/A N/A self user accesstoken_set first N/A auth N/A N/A self _create_authorization_header access_token N/A response N/A N/A N/A self client get /oauth2-test/ HTTP_AUTHORIZATION auth N/A N/A N/A self assertEqual N/A response status_code 200 N/A N/A