#NEWLINE# def test_get_metrics( self ) : #NEWLINE# #INDENT# prev_return = self . redis . mget . return_value #NEWLINE# self . redis . mget . return_value = [ '1' , '2' ] #NEWLINE# slugs = [ 'metric-1' , 'metric-2' ] #NEWLINE# keys_list = [ ] #NEWLINE# for s in slugs : #NEWLINE# #INDENT# keys_list . append ( self . r . _build_keys ( s ) ) #NEWLINE# #UNINDENT# calls = [ call ( * keys ) for keys in keys_list ] #NEWLINE# self . r . get_metrics ( slugs ) #NEWLINE# self . assertEqual ( self . redis . mget . call_args_list , calls ) #NEWLINE# self . assertTrue ( self . redis . mget . called ) #NEWLINE# self . assertEqual ( self . redis . mget . call_count , 2 ) #NEWLINE# self . redis . mget . return_value = prev_return