#NEWLINE# def test__init__with_default_kwargs( self ) : #NEWLINE# #INDENT# 'Test creation of an R object without parameters.' #NEWLINE# r_kwargs = { #NEWLINE# #INDENT# 'decode_responses' : True , #NEWLINE# 'host' : 'localhost' , #NEWLINE# 'db' : 0 , #NEWLINE# 'port' : 6379 , #NEWLINE# 'password' : None , #NEWLINE# 'connection_pool' : None , #NEWLINE# 'socket_timeout' : None , #NEWLINE# #UNINDENT# } #NEWLINE# with patch ( 'redis_metrics.models.redis.StrictRedis' ) as mock_redis : #NEWLINE# #INDENT# inst = R ( ) #NEWLINE# self . assertEqual ( inst . host , 'localhost' ) #NEWLINE# self . assertEqual ( inst . port , 6379 ) #NEWLINE# self . assertEqual ( inst . db , 0 ) #NEWLINE# self . assertEqual ( inst . password , None ) #NEWLINE# self . assertEqual ( inst . socket_timeout , None ) #NEWLINE# self . assertEqual ( inst . connection_pool , None ) #NEWLINE# self . assertEqual ( inst . _categories_key , 'categories' ) #NEWLINE# self . assertEqual ( inst . _metric_slugs_key , 'metric-slugs' ) #NEWLINE# self . assertEqual ( inst . _gauge_slugs_key , 'gauge-slugs' ) #NEWLINE# mock_redis . assert_called_once_with ( ** self )