Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Add tests for incorrect transaction handling #32

Merged
merged 1 commit into from
Jul 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/pool_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,18 @@ def test_response_decoding(self):
with (yield from pool) as redis:
res = yield from redis.get('key')
self.assertEqual(res, 'value')

@run_until_complete
def test_crappy_multiexec(self):
pool = yield from create_pool(
('localhost', self.redis_port),
encoding='utf-8', loop=self.loop,
minsize=1, maxsize=1)

with (yield from pool) as redis:
yield from redis.set('abc', 'def')
yield from redis.multi()
yield from redis.set('abc', 'fgh')
with (yield from pool) as redis:
value = yield from redis.get('abc')
self.assertEquals(value, 'def')