diff options
author | Garrett Holmstrom <gholms@fedoraproject.org> | 2012-06-08 14:21:18 -0700 |
---|---|---|
committer | Garrett Holmstrom <gholms@fedoraproject.org> | 2012-06-08 14:21:18 -0700 |
commit | abbae162a21e5001730f10214fc163f4a0563625 (patch) | |
tree | d15e5762c724c025e3db6e58f263b3516408cecb /tests/db | |
parent | 9539206ea82ca3a724675aa9f9e49e9b5d07c063 (diff) | |
download | boto-abbae162a21e5001730f10214fc163f4a0563625.tar.gz |
Appease PEP8 spacing guidelines
Diffstat (limited to 'tests/db')
-rw-r--r-- | tests/db/test_lists.py | 6 | ||||
-rw-r--r-- | tests/db/test_password.py | 4 | ||||
-rw-r--r-- | tests/db/test_sequence.py | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/tests/db/test_lists.py b/tests/db/test_lists.py index d9c76392..ceb0a07a 100644 --- a/tests/db/test_lists.py +++ b/tests/db/test_lists.py @@ -46,13 +46,13 @@ class TestLists(object): def test_list_order(self): """Testing the order of lists""" t = SimpleListModel() - t.nums = [5,4,1,3,2] + t.nums = [5, 4, 1, 3, 2] t.strs = ["B", "C", "A", "D", "Foo"] t.put() self.objs.append(t) time.sleep(3) t = SimpleListModel.get_by_id(t.id) - assert(t.nums == [5,4,1,3,2]) + assert(t.nums == [5, 4, 1, 3, 2]) assert(t.strs == ["B", "C", "A", "D", "Foo"]) def test_old_compat(self): @@ -82,7 +82,7 @@ class TestLists(object): time.sleep(3) assert(SimpleListModel.find(strs="Bizzle").count() == 1) assert(SimpleListModel.find(strs="Bar").count() == 1) - assert(SimpleListModel.find(strs=["Bar","Bizzle"]).count() == 1) + assert(SimpleListModel.find(strs=["Bar", "Bizzle"]).count() == 1) def test_query_not_equals(self): """Test a not equal filter""" diff --git a/tests/db/test_password.py b/tests/db/test_password.py index a0c1424a..74c34095 100644 --- a/tests/db/test_password.py +++ b/tests/db/test_password.py @@ -81,7 +81,7 @@ class PasswordPropertyTest(unittest.TestCase): id= obj.id time.sleep(5) obj = MyModel.get_by_id(id) - self.assertEquals(obj.password,'bar') + self.assertEquals(obj.password, 'bar') self.assertEquals(str(obj.password), expected) #hmac.new('mysecret','bar').hexdigest()) @@ -98,7 +98,7 @@ class PasswordPropertyTest(unittest.TestCase): def test_password_constructor_hashfunc(self): import hmac - myhashfunc=lambda msg: hmac.new('mysecret',msg) + myhashfunc=lambda msg: hmac.new('mysecret', msg) cls = self.test_model(hashfunc=myhashfunc) obj = cls() obj.password='hello' diff --git a/tests/db/test_sequence.py b/tests/db/test_sequence.py index 35f4b352..b950ee69 100644 --- a/tests/db/test_sequence.py +++ b/tests/db/test_sequence.py @@ -69,7 +69,7 @@ class TestDBHandler(object): assert(s2.val == 3) def test_sequence_simple_string(self): - from boto.sdb.db.sequence import Sequence,increment_string + from boto.sdb.db.sequence import Sequence, increment_string s = Sequence(fnc=increment_string) self.sequences.append(s) assert(s.val == "A") @@ -80,26 +80,26 @@ class TestDBHandler(object): from boto.sdb.db.sequence import fib # Just check the first few numbers in the sequence lv = 0 - for v in [1,2,3,5,8,13,21,34,55,89,144]: - assert(fib(v,lv) == lv+v) - lv = fib(v,lv) + for v in [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144]: + assert(fib(v, lv) == lv+v) + lv = fib(v, lv) def test_sequence_fib(self): """Test the fibonacci sequence""" - from boto.sdb.db.sequence import Sequence,fib + from boto.sdb.db.sequence import Sequence, fib s = Sequence(fnc=fib) s2 = Sequence(s.id) self.sequences.append(s) assert(s.val == 1) # Just check the first few numbers in the sequence - for v in [1,2,3,5,8,13,21,34,55,89,144]: + for v in [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144]: assert(s.next() == v) assert(s.val == v) assert(s2.val == v) # it shouldn't matter which reference we use since it's garunteed to be consistent def test_sequence_string(self): """Test the String incrementation sequence""" - from boto.sdb.db.sequence import Sequence,increment_string + from boto.sdb.db.sequence import Sequence, increment_string s = Sequence(fnc=increment_string) self.sequences.append(s) assert(s.val == "A") |