#NEWLINE# def callback_team_create( self , request , uri , headers , status_code = 201 , read_only = True ) : #NEWLINE# #INDENT# '\n        Create a new team as requested\n        ' #NEWLINE# self . assertEqual ( request . headers [ 'Authorization' ] , 'token {0}' . format ( self . OAUTH2_TOKEN ) ) #NEWLINE# json_body = json . loads ( request . body ) #NEWLINE# for item in [ 'name' , 'permission' ] : #NEWLINE# #INDENT# self . assertTrue ( ( item in json_body . keys ( ) ) ) #NEWLINE# #UNINDENT# if read_only : #NEWLINE# #INDENT# self . assertEqual ( json_body [ 'permission' ] , 'pull' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( json_body [ 'permission' ] , 'push' ) #NEWLINE# #UNINDENT# return ( status_code , headers , json . dumps ( { #NEWLINE# #INDENT# 'id' : 2 , #NEWLINE# #UNINDENT# } ) )