#NEWLINE# @ mock . patch . object ( trovebox . Trovebox , 'get' ) #NEWLINE# def test_album_view( self , mock_get ) : #NEWLINE# #INDENT# 'Check that an album can be viewed' #NEWLINE# mock_get . return_value = self . _return_value ( result . test_albums_dict [ 1 ] ) #NEWLINE# result = self . client . album . view ( self . test_albums [ 0 ] , includeElements = True ) #NEWLINE# mock_get . assert_called_with ( '/album/1/view.json' , includeElements = True ) #NEWLINE# self . assertEqual ( result . id , '2' ) #NEWLINE# self . assertEqual ( result . name , 'Album 2' ) #NEWLINE# self . assertEqual ( result . cover . id , '2b' ) #NEWLINE# self . assertEqual ( result . cover . tags , [ 'tag3' , 'tag4' ] ) #NEWLINE# self . assertEqual ( result . photos [ 0 ] . id , self . test_photos [ 1 ] . id )