#NEWLINE# def setupUserInfoMocks( self ) : #NEWLINE# #INDENT# user_info1 = flexmock ( name = 'UserInfo' , email = 'a@a.com' , is_user_cloud_admin = True , can_upload_apps = True , owned_apps = [ 'app1' , 'app2' ] ) #NEWLINE# user_info1 . should_receive ( 'put' ) . and_return ( ) #NEWLINE# user_info2 = flexmock ( name = 'UserInfo' , email = 'b@a.com' , is_user_cloud_admin = False , can_upload_apps = True , owned_apps = [ 'app2' ] ) #NEWLINE# user_info2 . should_receive ( 'put' ) . and_return ( ) #NEWLINE# user_info3 = flexmock ( name = 'UserInfo' , email = 'c@a.com' , is_user_cloud_admin = False , can_upload_apps = False , owned_apps = [ 'app2' ] ) #NEWLINE# user_info3 . should_receive ( 'put' ) . and_return ( ) #NEWLINE# flexmock ( app_dashboard_data ) . should_receive ( 'UserInfo' ) . and_return ( user_info2 ) #NEWLINE# flexmock ( AppDashboardData ) . should_receive ( 'get_by_id' ) . with_args ( app_dashboard_data . UserInfo , re . compile ( '@a.com' ) ) . and_return ( user_info1 ) . and_return ( user_info2 ) . and_return ( user_info3 )