Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad Call NameLoad attr attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd BinOpAdd Call NameLoad Str Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Str decorator_list Call NameLoad Str keyword TupleLoad Str Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd BinOpAdd Call NameLoad Str Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list Call NameLoad Str keyword Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list Call NameLoad Str keyword Dict FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad Str keyword Dict Str Str decorator_list Call NameLoad keyword Str
N/A django.conf settings django.contrib.auth get_user_model django.core.urlresolvers reverse django.test TestCase Client override_settings mock patch buildservice.models OAuthToken Repository OAuthViewsTestCase N/A TestCase N/A N/A login_url N/A reverse oauth_login N/A callback_url N/A reverse oauth_callback setUp N/A N/A self N/A N/A N/A N/A self client N/A Client N/A N/A self user N/A N/A N/A N/A get_user_model objects create_user user password pwd N/A test_get_login_anonymous N/A N/A self N/A N/A N/A resp N/A N/A N/A self client get N/A self login_url N/A N/A N/A self assertEqual N/A resp status_code 302 N/A N/A N/A self assertEqual N/A resp url N/A N/A N/A reverse auth_login ?next= N/A self login_url N/A test_get_login_ok N/A N/A self authorization_url N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username user password pwd N/A resp N/A N/A N/A self client get N/A self login_url N/A N/A N/A self assertEqual N/A resp status_code 302 N/A N/A N/A authorization_url assert_called_with N/A settings GITHUB_AUTHORIZATION_BASE_URL N/A N/A N/A self assertEqual N/A resp url https://github.com N/A N/A N/A self assertEqual N/A N/A N/A resp wsgi_request session N/A oauth_state the_state N/A N/A patch requests_oauthlib.OAuth2Session.authorization_url return_value N/A https://github.com the_state test_callback_anonymous N/A N/A self N/A N/A N/A resp N/A N/A N/A self client get N/A self callback_url N/A N/A N/A self assertEqual N/A resp status_code 302 N/A N/A N/A self assertEqual N/A resp url N/A N/A N/A reverse auth_login ?next= N/A self callback_url N/A test_callback_token_missing_oauth_state N/A N/A self N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username user password pwd N/A resp N/A N/A N/A self client get N/A self callback_url N/A N/A N/A self assertEqual N/A resp status_code 400 N/A N/A N/A self assertEqual N/A resp content Missing oauth state. N/A test_callback_token_malformatted N/A N/A self fetch_token N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username user password pwd N/A session N/A N/A self client session N/A N/A session N/A oauth_state the_state N/A N/A N/A session save N/A resp N/A N/A N/A self client get N/A self callback_url N/A N/A N/A fetch_token assert_called_with N/A settings GITHUB_TOKEN_URL client_secret the_secret authorization_response N/A N/A N/A resp wsgi_request build_absolute_uri N/A N/A N/A self assertEqual N/A resp status_code 400 N/A N/A N/A self assertEqual N/A resp content Cannot read access_token. N/A N/A patch requests_oauthlib.OAuth2Session.fetch_token return_value token test_callback_token_malformatted_bis N/A N/A self fetch_token N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username user password pwd N/A session N/A N/A self client session N/A N/A session N/A oauth_state the_state N/A N/A N/A session save N/A resp N/A N/A N/A self client get N/A self callback_url N/A N/A N/A fetch_token assert_called_with N/A settings GITHUB_TOKEN_URL client_secret the_secret authorization_response N/A N/A N/A resp wsgi_request build_absolute_uri N/A N/A N/A self assertEqual N/A resp status_code 400 N/A N/A N/A self assertEqual N/A resp content Cannot read access_token. N/A N/A patch requests_oauthlib.OAuth2Session.fetch_token return_value N/A test_callback_ok N/A N/A self fetch_token add_repos N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A self client login username user password pwd N/A session N/A N/A self client session N/A N/A session N/A oauth_state the_state N/A N/A N/A session save N/A resp N/A N/A N/A self client get N/A self callback_url N/A N/A N/A fetch_token assert_called_with N/A settings GITHUB_TOKEN_URL client_secret the_secret authorization_response N/A N/A N/A resp wsgi_request build_absolute_uri N/A N/A N/A add_repos assert_called_with N/A self user N/A N/A N/A self assertEqual N/A resp status_code 302 N/A N/A N/A self assertEqual N/A resp url / N/A token N/A N/A N/A OAuthToken objects get user N/A self user N/A N/A N/A self assertEqual N/A token value abc N/A N/A N/A patch object Repository add_user_to_known_repositories N/A patch requests_oauthlib.OAuth2Session.fetch_token return_value N/A access_token abc N/A N/A override_settings GITHUB_CLIENT_SECRET the_secret