#NEWLINE# def test_upload_photos( self ) : #NEWLINE# #INDENT# 'create_image should return JSON response with filelink and id.' #NEWLINE# response = self . client . post ( reverse ( 'create_image' ) , { #NEWLINE# #INDENT# 'file' : get_in_memory_image_file ( ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# json_response = json . loads ( self . content ) #NEWLINE# self . assertTrue ( ( 'filelink' in json_response [ 0 ] . keys ( ) ) ) #NEWLINE# self . assertTrue ( json_response [ 0 ] [ 'filelink' ] . startswith ( settings . ORIGIN ) ) #NEWLINE# self . assertTrue ( ( 'id' in json_response [ 0 ] . keys ( ) ) )