#NEWLINE# @ mock . patch ( 'cloudbaseinit.metadata.services.maasservice.MaaSHttpService._get_cache_data' ) #NEWLINE# def test_get_user_data( self , mock_get_cache_data ) : #NEWLINE# #INDENT# response = self . _maasservice . get_user_data ( ) #NEWLINE# mock_get_cache_data . assert_called_once_with ( ( '%s/user-data' % self . _maasservice . _metadata_version ) ) #NEWLINE# self . assertEqual ( mock_get_cache_data . return_value , response )