diff --git a/tests/redis-configurations/unixdomainsocket.conf b/tests/redis-configurations/unixdomainsocket.conf index 6ec7abce..bc70ab30 100644 --- a/tests/redis-configurations/unixdomainsocket.conf +++ b/tests/redis-configurations/unixdomainsocket.conf @@ -67,7 +67,7 @@ tcp-backlog 511 # incoming connections. There is no default, so Redis will not listen # on a unix socket when not specified. # -unixsocket /var/tmp/limits.redis.sock +unixsocket /tmp/limits.redis.sock # unixsocketperm 700 # Close the connection after a client is idle for N seconds (0 to disable) diff --git a/tests/test_storage.py b/tests/test_storage.py index e4079544..893c5594 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -25,7 +25,7 @@ class BaseStorageTests(unittest.TestCase): def setUp(self): pymemcache.client.Client(('localhost', 22122)).flush_all() - redis.from_url('unix:///var/tmp/limits.redis.sock').flushall() + redis.from_url('unix:///tmp/limits.redis.sock').flushall() redis.from_url("redis://localhost:7379").flushall() redis.from_url("redis://:sekret@localhost:7389").flushall() redis.sentinel.Sentinel([ @@ -49,13 +49,13 @@ def test_storage_string(self): ) self.assertTrue( isinstance( - storage_from_string("redis+unix:///var/tmp/limits.redis.sock"), RedisStorage + storage_from_string("redis+unix:///tmp/limits.redis.sock"), RedisStorage ) ) self.assertTrue( isinstance( - storage_from_string("redis+unix://:password/var/tmp/limits.redis.sock"), RedisStorage + storage_from_string("redis+unix://:password/tmp/limits.redis.sock"), RedisStorage ) ) @@ -128,7 +128,7 @@ def test_storage_check(self): self.assertTrue(storage_from_string("memory://").check()) self.assertTrue(storage_from_string("redis://localhost:7379").check()) self.assertTrue(storage_from_string("redis://:sekret@localhost:7389").check()) - self.assertTrue(storage_from_string("redis+unix:///var/tmp/limits.redis.sock").check()) + self.assertTrue(storage_from_string("redis+unix:///tmp/limits.redis.sock").check()) self.assertTrue( storage_from_string("memcached://localhost:22122").check() ) @@ -342,9 +342,9 @@ def test_init_options(self): class RedisUnixSocketStorageTests(SharedRedisTests, unittest.TestCase): def setUp(self): - self.storage_url = "redis+unix:///var/tmp/limits.redis.sock" + self.storage_url = "redis+unix:///tmp/limits.redis.sock" self.storage = RedisStorage(self.storage_url) - redis.from_url('unix:///var/tmp/limits.redis.sock').flushall() + redis.from_url('unix:///tmp/limits.redis.sock').flushall() def test_init_options(self): with mock.patch("limits.storage.get_dependency") as get_dependency: