summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Walker <brendan.walker@pelotoncycle.com>2017-02-13 16:01:47 -0500
committerBrendan Walker <brendan.walker@pelotoncycle.com>2017-02-13 16:01:47 -0500
commita91f0b108732a993340c52a2f63eb635547ef2c9 (patch)
tree8e6a1433f569aa0b8a70c7a3a2832fad325b5bf5
parent31be6ae6be5bc6c41cb0cfcf7ac336ce964bb8d7 (diff)
downloadpymemcache-a91f0b108732a993340c52a2f63eb635547ef2c9.tar.gz
Moving test cases
-rw-r--r--pymemcache/test/test_client.py54
1 files changed, 27 insertions, 27 deletions
diff --git a/pymemcache/test/test_client.py b/pymemcache/test/test_client.py
index 05e29a0..329562c 100644
--- a/pymemcache/test/test_client.py
+++ b/pymemcache/test/test_client.py
@@ -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)