mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
20 lines
573 B
Python
20 lines
573 B
Python
import pytest
|
|
import redis
|
|
|
|
def test_quit(connection):
|
|
connection.send_command("QUIT")
|
|
assert connection.read_response() == b'OK'
|
|
|
|
with pytest.raises(redis.exceptions.ConnectionError) as e:
|
|
connection.read_response()
|
|
|
|
def test_quit_after_sub(connection):
|
|
connection = redis.Connection()
|
|
connection.send_command("SUBSCRIBE", "foo")
|
|
connection.read_response()
|
|
|
|
connection.send_command("QUIT")
|
|
assert connection.read_response() == b'OK'
|
|
|
|
with pytest.raises(redis.exceptions.ConnectionError) as e:
|
|
connection.read_response()
|