diff options
author | andy <andy@andymccurdy.com> | 2011-10-25 11:42:38 -0700 |
---|---|---|
committer | andy <andy@andymccurdy.com> | 2011-10-25 11:42:38 -0700 |
commit | 87f131522546a73441a78cab2304c56f2ec89526 (patch) | |
tree | 0c6d26f7ce86abbadcb32e9df4c2c8e8666ff087 /tests/server_commands.py | |
parent | 903aa2cb7e011f826c30842e7a59a57efe72b7c1 (diff) | |
download | redis-py-87f131522546a73441a78cab2304c56f2ec89526.tar.gz |
pep8
Diffstat (limited to 'tests/server_commands.py')
-rw-r--r-- | tests/server_commands.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/server_commands.py b/tests/server_commands.py index 0416748..316a102 100644 --- a/tests/server_commands.py +++ b/tests/server_commands.py @@ -107,7 +107,6 @@ class ServerCommandsTestCase(unittest.TestCase): def test_ping(self): self.assertEquals(self.client.ping(), True) - # KEYS def test_append(self): # invalid key type @@ -197,7 +196,7 @@ class ServerCommandsTestCase(unittest.TestCase): def test_mset(self): d = {'a': '1', 'b': '2', 'c': '3'} self.assert_(self.client.mset(d)) - for k,v in d.iteritems(): + for k, v in d.iteritems(): self.assertEquals(self.client[k], v) def test_msetnx(self): @@ -205,7 +204,7 @@ class ServerCommandsTestCase(unittest.TestCase): self.assert_(self.client.msetnx(d)) d2 = {'a': 'x', 'd': '4'} self.assert_(not self.client.msetnx(d2)) - for k,v in d.iteritems(): + for k, v in d.iteritems(): self.assertEquals(self.client[k], v) self.assertEquals(self.client.get('d'), None) @@ -232,7 +231,7 @@ class ServerCommandsTestCase(unittest.TestCase): def test_setex(self): self.assertEquals(self.client.setex('a', '1', 60), True) self.assertEquals(self.client['a'], '1') - self.assertEquals(self.client.ttl('a'), 60 ) + self.assertEquals(self.client.ttl('a'), 60) def test_setnx(self): self.assert_(self.client.setnx('a', '1')) @@ -702,7 +701,7 @@ class ServerCommandsTestCase(unittest.TestCase): # SORTED SETS def make_zset(self, name, d): - for k,v in d.items(): + for k, v in d.items(): self.client.zadd(name, **{k: v}) def test_zadd(self): @@ -950,10 +949,9 @@ class ServerCommandsTestCase(unittest.TestCase): [('a2', 1), ('a3', 5), ('a5', 12), ('a4', 19), ('a1', 23)] ) - # HASHES def make_hash(self, key, d): - for k,v in d.iteritems(): + for k, v in d.iteritems(): self.client.hset(key, k, v) def test_hget_and_hset(self): @@ -1064,7 +1062,6 @@ class ServerCommandsTestCase(unittest.TestCase): self.client.hset('a', 'a3', 'foo') self.assertRaises(redis.ResponseError, self.client.hincrby, 'a', 'a3') - def test_hkeys(self): # key is not a hash self.client['a'] = 'a' |