Moving test cases

This commit is contained in:
Brendan Walker 2017-02-13 16:01:47 -05:00
parent 31be6ae6be
commit a91f0b1087
1 changed files with 27 additions and 27 deletions

View File

@ -132,33 +132,6 @@ class ClientTestMixin(object):
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_key_with_space(self):
client = self.make_client([b''])
def _set():
client.set(b'key has space', b'value', noreply=False)
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_key_with_newline(self):
client = self.make_client([b''])
def _set():
client.set(b'key\n', b'value', noreply=False)
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_key_with_carriage_return(self):
client = self.make_client([b''])
def _set():
client.set(b'key\r\n', b'value', noreply=False)
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_unicode_char_in_middle_of_key_ok(self):
client = self.make_client([b'STORED\r\n'], allow_unicode_keys=True)
@ -581,6 +554,33 @@ class TestClient(ClientTestMixin, unittest.TestCase):
with pytest.raises(MemcacheUnknownError):
_set()
def test_set_key_with_space(self):
client = self.make_client([b''])
def _set():
client.set(b'key has space', b'value', noreply=False)
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_key_with_newline(self):
client = self.make_client([b''])
def _set():
client.set(b'key\n', b'value', noreply=False)
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_key_with_carriage_return(self):
client = self.make_client([b''])
def _set():
client.set(b'key\r\n', b'value', noreply=False)
with pytest.raises(MemcacheIllegalInputError):
_set()
def test_set_many_socket_handling(self):
client = self.make_client([b'STORED\r\n'])
result = client.set_many({b'key': b'value'}, noreply=False)