Skip to content

Commit 92619dd

Browse files
use fixture for redis client in tests
1 parent 72d6236 commit 92619dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/integration/test_session_manager.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99

1010
@pytest.fixture
11-
def standard_session(app_name):
12-
session = StandardSessionManager(app_name)
11+
def standard_session(app_name, client):
12+
session = StandardSessionManager(app_name, redis_client=client)
1313
yield session
1414
session.clear()
1515

1616

1717
@pytest.fixture
18-
def semantic_session(app_name):
19-
session = SemanticSessionManager(app_name)
18+
def semantic_session(app_name, client):
19+
session = SemanticSessionManager(app_name, redis_client=client)
2020
yield session
2121
session.clear()
2222
session.delete()
@@ -28,12 +28,12 @@ def test_specify_redis_client(client):
2828
assert isinstance(session._index.client, type(client))
2929

3030

31-
def test_specify_redis_url(client):
31+
def test_specify_redis_url(client, redis_url):
3232
session = StandardSessionManager(
3333
name="test_app",
3434
session_tag="abc",
3535
user_tag="123",
36-
redis_url="redis://localhost:6379",
36+
redis_url=redis_url,
3737
)
3838
assert isinstance(session._index.client, type(client))
3939

0 commit comments

Comments
 (0)