#NEWLINE# def test_metrics_mgr_get_metric_data_points_invalid_request_other( self ) : #NEWLINE# #INDENT# ent = self . entity #NEWLINE# chk = self . check #NEWLINE# mgr = chk . _metrics_manager #NEWLINE# metric = utils . random_unicode ( ) #NEWLINE# points = utils . random_unicode ( ) #NEWLINE# resolution = 'FULL' #NEWLINE# end = datetime . datetime . now ( ) #NEWLINE# start = ( end - datetime . timedelta ( days = 7 ) ) #NEWLINE# stats = [ 'foo' , 'bar' ] #NEWLINE# err = exc . BadRequest ( 400 ) #NEWLINE# err . message = 'Some other error: foo' #NEWLINE# mgr . api . method_get = Mock ( side_effect = err ) #NEWLINE# self . assertRaises ( exc . BadRequest , mgr . get_metric_data_points , metric , start , end , points = points , resolution = resolution , stats = stats )