PEP8 cleanup.

This commit is contained in:
Josh Kearney 2011-01-26 17:06:23 +00:00 committed by Tarmac
commit 61ba30ad89
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. # A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['glance.'] 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' # List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
man_pages = [ man_pages = [

View File

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

View File

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

View File

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