Skip to content

Commit

Permalink
fix redisdb test
Browse files Browse the repository at this point in the history
  • Loading branch information
iliakur committed Sep 16, 2024
1 parent 8ff4ec4 commit 3d5f8d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions redisdb/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ def test__get_conn(check, redis_instance):

# create a connection
check._get_conn(instance)
key1, conn1 = next(check.connections.items())
key1, conn1 = next(iter(check.connections.items()))

# assert connection is cached
check._get_conn(instance)
key2, conn2 = next(check.connections.items())
key2, conn2 = next(iter(check.connections.items()))
assert key2 == key1
assert conn2 == conn1

# disable cache and assert connection has changed
instance['disable_connection_cache'] = True
check._get_conn(instance)
key2, conn2 = next(check.connections.items())
key2, conn2 = next(iter(check.connections.items()))
assert key2 == key1
assert conn2 != conn1

Expand Down

0 comments on commit 3d5f8d1

Please sign in to comment.