summaryrefslogtreecommitdiff
path: root/pymemcache/test
diff options
context:
space:
mode:
authorJerry Miu <miujerry@amazon.com>2021-04-14 13:11:57 -0700
committerGitHub <noreply@github.com>2021-04-14 13:11:57 -0700
commitf232bdd073f2326485604b690e839c46c42c60f4 (patch)
tree0cd2802e4e7cc6ccc65805cb20e76ecc471c117b /pymemcache/test
parent8781c772aceb99dcac93280a0e434888ac814e38 (diff)
downloadpymemcache-f232bdd073f2326485604b690e839c46c42c60f4.tar.gz
Removing trailing space after a command if there are no arguments. (#311)
According to the Memcached Protocol, the no argument form of the stats command should have no trailing spaces. Currently, b'stats \r\n' instead of b'stats\r\n' is being sent to the socket which leads to a malformed response.
Diffstat (limited to 'pymemcache/test')
-rw-r--r--pymemcache/test/test_client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pymemcache/test/test_client.py b/pymemcache/test/test_client.py
index 91655ed..bdaf233 100644
--- a/pymemcache/test/test_client.py
+++ b/pymemcache/test/test_client.py
@@ -889,7 +889,7 @@ class TestClient(ClientTestMixin, unittest.TestCase):
client = self.make_client([b'STAT fake_stats 1\r\n', b'END\r\n'])
result = client.stats()
assert client.sock.send_bufs == [
- b'stats \r\n'
+ b'stats\r\n'
]
assert result == {b'fake_stats': 1}
@@ -923,7 +923,7 @@ class TestClient(ClientTestMixin, unittest.TestCase):
])
result = client.stats()
assert client.sock.send_bufs == [
- b'stats \r\n'
+ b'stats\r\n'
]
expected = {
b'cmd_get': 2519,