PEP8 cleanup

This commit is contained in:
Josh Kearney 2011-01-26 10:51:08 -06:00
parent a8d791c2d7
commit f536fdd8f3
4 changed files with 11 additions and 11 deletions

View File

@ -118,9 +118,9 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['glance.']
# -- Options for man page output -----------------------------------------------
# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
man_pages = [

View File

@ -117,6 +117,7 @@ def stub_out_s3_backend(stubs):
class FakeSwiftAuth(object):
pass
class FakeS3Connection(object):
pass
@ -134,8 +135,8 @@ def stub_out_s3_backend(stubs):
def chunk_it():
for i in xrange(0, len(cls.DATA), cls.CHUNK_SIZE):
yield cls.DATA[i:i+cls.CHUNK_SIZE]
yield cls.DATA[i:i + cls.CHUNK_SIZE]
return chunk_it()
fake_swift_backend = FakeS3Backend()

View File

@ -388,7 +388,7 @@ class TestClient(unittest.TestCase):
'is_public': True,
'type': 'kernel'
}
image_meta = self.client.add_image(fixture)
self.assertEquals('queued', image_meta['status'])
self.assertEquals(0, image_meta['size'])
@ -401,7 +401,7 @@ class TestClient(unittest.TestCase):
'size': 19,
'location': "file:///tmp/glance-tests/2",
}
new_image = self.client.add_image(fixture)
new_image_id = new_image['id']
@ -434,7 +434,7 @@ class TestClient(unittest.TestCase):
'location': "file:///tmp/glance-tests/2",
'properties': {'distro': 'Ubuntu 10.04 LTS'}
}
new_image = self.client.add_image(fixture)
new_image_id = new_image['id']

View File

@ -96,17 +96,16 @@ class TestS3Backend(TestBackend):
def test_get(self):
s3_uri = "s3://user:password@localhost/bucket1/file.tar.gz"
expected_returns = ['I ', 'am', ' a', ' t', 'ea', 'po', 't,', ' s',
expected_returns = ['I ', 'am', ' a', ' t', 'ea', 'po', 't,', ' s',
'ho', 'rt', ' a', 'nd', ' s', 'to', 'ut', '\n']
fetcher = get_from_backend(s3_uri,
expected_size=8,
fetcher = get_from_backend(s3_uri,
expected_size=8,
conn_class=S3Backend)
chunks = [c for c in fetcher]
self.assertEqual(chunks, expected_returns)
class TestSwiftBackend(TestBackend):
def setUp(self):