#NEWLINE# def test_img( app ) : #NEWLINE# #INDENT# with mock . patch ( 'main.images' ) as mock_images : #NEWLINE# #INDENT# mock_images . resize . return_value = 'asdf' #NEWLINE# mock_images . im_feeling_lucky . return_value = 'gsdf' #NEWLINE# photo = main . Photo ( id = 234 ) #NEWLINE# photo . title = 'asdf' #NEWLINE# photo . full_size_image = b'123' #NEWLINE# photo . put ( ) #NEWLINE# response = app . get ( ( '/img?id=%s' % photo . key . id ( ) ) ) #NEWLINE# assert ( response . status_int == 200 )