def test_db(self): self.assertEqual(SentinelExtension._config_from_variables({'DB': 2}, redis.StrictRedis), {'db': 2})
def test_host(self): self.assertEqual(SentinelExtension._config_from_variables({'HOST': 'otherhost'}, redis.StrictRedis), {'host': 'otherhost'})
def test_host_file_url(self): self.assertEqual(SentinelExtension._config_from_variables({'HOST': 'file:///path/to/socket'}, redis.StrictRedis), {'unix_socket_path': 'file:///path/to/socket'})
def test_empty_settings(self): self.assertEqual(SentinelExtension._config_from_variables({}, redis.StrictRedis), {})
def test_port(self): self.assertEqual(SentinelExtension._config_from_variables({'PORT': 7379}, redis.StrictRedis)['port'], 7379)
def test_db(self): self.assertEqual( SentinelExtension._config_from_variables({'DB': 2}, redis.StrictRedis), {'db': 2})
def test_host_file_url(self): self.assertEqual( SentinelExtension._config_from_variables( {'HOST': 'file:///path/to/socket'}, redis.StrictRedis), {'unix_socket_path': 'file:///path/to/socket'})
def test_host(self): self.assertEqual( SentinelExtension._config_from_variables({'HOST': 'otherhost'}, redis.StrictRedis), {'host': 'otherhost'})
def test_port(self): self.assertEqual( SentinelExtension._config_from_variables( {'PORT': 7379}, redis.StrictRedis)['port'], 7379)
def test_empty_settings(self): self.assertEqual( SentinelExtension._config_from_variables({}, redis.StrictRedis), {})