#NEWLINE# @ mock . patch . object ( _polygrid_module . PolyGrid , 'create_from_image' ) #NEWLINE# @ mock . patch . object ( _polygrid_module , '_string_image' ) #NEWLINE# def test_create_string_converts_to_image_then_uses_create_image( self , m_s_img , m_crt_im ) : #NEWLINE# #INDENT# grid = generic_grid ( ) #NEWLINE# source_string_spec = 'asdf' #NEWLINE# grid . create_string ( source_string_spec ) #NEWLINE# m_s_img_args = m_s_img . call_args [ 0 ] #NEWLINE# self . assertIn ( source_string_spec , m_s_img_args ) #NEWLINE# m_crt_im_args = m_crt_im . call_args [ 0 ] #NEWLINE# self . assertIn ( m_s_img . return_value , m_crt_im_args )