#NEWLINE# @ mock . patch . object ( trovebox . Trovebox , 'post' ) #NEWLINE# def test_album_cover_update( self , mock_post ) : #NEWLINE# #INDENT# 'Check that an album cover can be updated' #NEWLINE# mock_post . return_value = self . _return_value ( self . test_albums_dict [ 1 ] ) #NEWLINE# result = self . client . album . cover_update ( self . test_albums [ 0 ] , self . test_photos [ 0 ] , foo = 'bar' ) #NEWLINE# mock_post . assert_called_with ( '/album/1/cover/1a/update.json' , foo = 'bar' ) #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' ] )