Module ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword Dict Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad NameLoad Index Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword Dict Str 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 Call AttributeLoad Str attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Dict Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Dict Str Str keyword 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 Call AttributeLoad Str attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Dict Str 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 Call AttributeLoad Str attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A tests BaseTestCase tests.handlers authenticated_user json_request redash.wsgi app redash models TestUserListResourcePost N/A BaseTestCase N/A test_returns_403_for_non_admin N/A N/A self N/A N/A N/A rv N/A N/A self make_request post /api/users N/A N/A N/A self assertEqual N/A rv status_code 403 N/A test_returns_400_when_missing_fields N/A N/A self N/A N/A N/A admin N/A N/A N/A self factory create_admin N/A rv N/A N/A self make_request post /api/users user admin N/A N/A N/A self assertEqual N/A rv status_code 400 N/A rv N/A N/A self make_request post /api/users data N/A name User user admin N/A N/A N/A self assertEqual N/A rv status_code 400 N/A test_creates_user N/A N/A self N/A N/A N/A admin N/A N/A N/A self factory create_admin N/A test_user N/A name email password User user@example.com test N/A rv N/A N/A self make_request post /api/users data test_user user admin N/A N/A N/A self assertEqual N/A rv status_code 200 N/A N/A N/A self assertEqual N/A N/A rv json N/A name N/A test_user N/A name N/A N/A N/A self assertEqual N/A N/A rv json N/A email N/A test_user N/A email N/A N/A TestUserListGet N/A BaseTestCase N/A test_returns_users_for_given_org_only N/A N/A self N/A N/A N/A user1 N/A N/A self factory user N/A user2 N/A N/A N/A self factory create_user N/A org N/A N/A N/A self factory create_org N/A user3 N/A N/A N/A self factory create_user org org N/A rv N/A N/A self make_request get /api/users N/A user_ids N/A map N/A N/A N/A u N/A N/A u N/A id N/A rv json N/A N/A N/A self assertIn N/A user1 id user_ids N/A N/A N/A self assertIn N/A user2 id user_ids N/A N/A N/A self assertNotIn N/A user3 id user_ids N/A N/A TestUserResourceGet N/A BaseTestCase N/A test_returns_api_key_for_your_own_user N/A N/A self N/A N/A N/A rv N/A N/A self make_request get N/A N/A /api/users/{} format N/A N/A N/A self factory user id N/A N/A N/A self assertIn api_key N/A rv json N/A test_returns_api_key_for_other_user_when_admin N/A N/A self N/A N/A N/A other_user N/A N/A self factory user N/A admin N/A N/A N/A self factory create_admin N/A rv N/A N/A self make_request get N/A N/A /api/users/{} format N/A other_user id user admin N/A N/A N/A self assertIn api_key N/A rv json N/A test_doesnt_return_api_key_for_other_user N/A N/A self N/A N/A N/A other_user N/A N/A N/A self factory create_user N/A rv N/A N/A self make_request get N/A N/A /api/users/{} format N/A other_user id N/A N/A N/A self assertNotIn api_key N/A rv json N/A test_doesnt_return_user_from_different_org N/A N/A self N/A N/A N/A org N/A N/A N/A self factory create_org N/A other_user N/A N/A N/A self factory create_user org org N/A rv N/A N/A self make_request get N/A N/A /api/users/{} format N/A other_user id N/A N/A N/A self assertEqual N/A rv status_code 404 N/A N/A TestUserResourcePost N/A BaseTestCase N/A test_returns_403_for_non_admin_changing_not_his_own N/A N/A self N/A N/A N/A other_user N/A N/A N/A self factory create_user N/A rv N/A N/A self make_request post N/A N/A /api/users/{} format N/A other_user id data N/A name New Name N/A N/A N/A self assertEqual N/A rv status_code 403 N/A test_returns_200_for_non_admin_changing_his_own N/A N/A self N/A N/A N/A rv N/A N/A self make_request post N/A N/A /api/users/{} format N/A N/A N/A self factory user id data N/A name New Name N/A N/A N/A self assertEqual N/A rv status_code 200 N/A test_returns_200_for_admin_changing_other_user N/A N/A self N/A N/A N/A admin N/A N/A N/A self factory create_admin N/A rv N/A N/A self make_request post N/A N/A /api/users/{} format N/A N/A N/A self factory user id data N/A name New Name user admin N/A N/A N/A self assertEqual N/A rv status_code 200 N/A test_fails_password_change_without_old_password N/A N/A self N/A N/A N/A rv N/A N/A self make_request post N/A N/A /api/users/{} format N/A N/A N/A self factory user id data N/A password new password N/A N/A N/A self assertEqual N/A rv status_code 403 N/A test_fails_password_change_with_incorrect_old_password N/A N/A self N/A N/A N/A rv N/A N/A self make_request post N/A N/A /api/users/{} format N/A N/A N/A self factory user id data N/A password old_password new password wrong N/A N/A N/A self assertEqual N/A rv status_code 403 N/A test_changes_password N/A N/A self N/A N/A N/A new_password new password N/A old_password old password N/A N/A N/A N/A N/A self factory user hash_password old_password N/A N/A N/A N/A N/A self factory user save N/A rv N/A N/A self make_request post N/A N/A /api/users/{} format N/A N/A N/A self factory user id data N/A password old_password new_password old_password N/A N/A N/A self assertEqual N/A rv status_code 200 N/A user N/A N/A N/A models User get_by_id N/A N/A N/A self factory user id N/A N/A N/A self assertTrue N/A N/A user verify_password new_password N/A N/A