diff options
author | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2014-09-17 12:34:28 +0300 |
---|---|---|
committer | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2014-09-20 21:13:41 +0300 |
commit | 71ae81d69c937343c0b7b53e5a9703aeca9c0acd (patch) | |
tree | 7280dec59a430435bfc08bd6682e25a3375c12bb /tests/unit | |
parent | 692a6cdc6ec516f3cd5fdc600e20c6cb6fc3ca6d (diff) | |
download | glance_store-71ae81d69c937343c0b7b53e5a9703aeca9c0acd.tar.gz |
Fix H402
Fix `one line docstring needs punctuation.`
Remove H402 from ignore list.
Change-Id: I0cd3b88467067cdb10d41f86cc94e075da141ac0
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test_filesystem_store.py | 2 | ||||
-rw-r--r-- | tests/unit/test_gridfs_store.py | 2 | ||||
-rw-r--r-- | tests/unit/test_rbd_store.py | 2 | ||||
-rw-r--r-- | tests/unit/test_s3_store.py | 10 | ||||
-rw-r--r-- | tests/unit/test_sheepdog_store.py | 2 | ||||
-rw-r--r-- | tests/unit/test_swift_store.py | 6 | ||||
-rw-r--r-- | tests/unit/test_utils.py | 2 | ||||
-rw-r--r-- | tests/unit/test_vmware_store.py | 12 |
8 files changed, 20 insertions, 18 deletions
diff --git a/tests/unit/test_filesystem_store.py b/tests/unit/test_filesystem_store.py index bd57918..2961b31 100644 --- a/tests/unit/test_filesystem_store.py +++ b/tests/unit/test_filesystem_store.py @@ -130,7 +130,7 @@ class TestStore(base.StoreBaseTest): loc) def test_add(self): - """Test that we can add an image via the filesystem backend""" + """Test that we can add an image via the filesystem backend.""" ChunkedFile.CHUNKSIZE = 1024 expected_image_id = str(uuid.uuid4()) expected_file_size = 5 * KB # 5K diff --git a/tests/unit/test_gridfs_store.py b/tests/unit/test_gridfs_store.py index d9aa997..811584c 100644 --- a/tests/unit/test_gridfs_store.py +++ b/tests/unit/test_gridfs_store.py @@ -78,7 +78,7 @@ class FakeGridFS(object): class TestStore(base.StoreBaseTest): def setUp(self): - """Establish a clean test environment""" + """Establish a clean test environment.""" super(TestStore, self).setUp() if pymongo is not None: diff --git a/tests/unit/test_rbd_store.py b/tests/unit/test_rbd_store.py index 6d1a534..ae164b7 100644 --- a/tests/unit/test_rbd_store.py +++ b/tests/unit/test_rbd_store.py @@ -143,7 +143,7 @@ class MockRBD(object): class TestStore(base.StoreBaseTest): def setUp(self): - """Establish a clean test environment""" + """Establish a clean test environment.""" super(TestStore, self).setUp() rbd_store.rados = MockRados diff --git a/tests/unit/test_s3_store.py b/tests/unit/test_s3_store.py index 4e5f562..a66ce6b 100644 --- a/tests/unit/test_s3_store.py +++ b/tests/unit/test_s3_store.py @@ -148,7 +148,7 @@ def format_s3_location(user, key, authurl, bucket, obj): class TestStore(base.StoreBaseTest): def setUp(self): - """Establish a clean test environment""" + """Establish a clean test environment.""" super(TestStore, self).setUp() self.store = s3.Store(self.conf) self.config(**S3_CONF) @@ -168,7 +168,7 @@ class TestStore(base.StoreBaseTest): self.addCleanup(bucket.stop) def test_get(self): - """Test a "normal" retrieval of an image in chunks""" + """Test a "normal" retrieval of an image in chunks.""" loc = get_location_from_uri( "s3://user:key@auth_address/glance/%s" % FAKE_UUID) (image_s3, image_size) = self.store.get(loc) @@ -183,7 +183,7 @@ class TestStore(base.StoreBaseTest): self.assertEqual(expected_data, data) def test_get_calling_format_path(self): - """Test a "normal" retrieval of an image in chunks""" + """Test a "normal" retrieval of an image in chunks.""" self.config(s3_store_bucket_url_format='path') def fake_S3Connection_init(*args, **kwargs): @@ -199,7 +199,7 @@ class TestStore(base.StoreBaseTest): (image_s3, image_size) = self.store.get(loc) def test_get_calling_format_default(self): - """Test a "normal" retrieval of an image in chunks""" + """Test a "normal" retrieval of an image in chunks.""" def fake_S3Connection_init(*args, **kwargs): expected_cls = boto.s3.connection.SubdomainCallingFormat @@ -227,7 +227,7 @@ class TestStore(base.StoreBaseTest): self.assertRaises(exceptions.NotFound, self.store.get, loc) def test_add(self): - """Test that we can add an image via the s3 backend""" + """Test that we can add an image via the s3 backend.""" expected_image_id = str(uuid.uuid4()) expected_s3_size = FIVE_KB expected_s3_contents = "*" * expected_s3_size diff --git a/tests/unit/test_sheepdog_store.py b/tests/unit/test_sheepdog_store.py index 4f2959b..4384cf3 100644 --- a/tests/unit/test_sheepdog_store.py +++ b/tests/unit/test_sheepdog_store.py @@ -25,7 +25,7 @@ from glance_store.tests import base class TestSheepdogStore(base.StoreBaseTest): def setUp(self): - """Establish a clean test environment""" + """Establish a clean test environment.""" super(TestSheepdogStore, self).setUp() def _fake_execute(*cmd, **kwargs): diff --git a/tests/unit/test_swift_store.py b/tests/unit/test_swift_store.py index f6b4715..1724172 100644 --- a/tests/unit/test_swift_store.py +++ b/tests/unit/test_swift_store.py @@ -269,7 +269,7 @@ class SwiftTests(object): self.assertEqual(size, 5120) def test_get(self): - """Test a "normal" retrieval of an image in chunks""" + """Test a "normal" retrieval of an image in chunks.""" uri = "swift://%s:key@auth_address/glance/%s" % ( self.swift_store_user, FAKE_UUID) loc = get_location_from_uri(uri) @@ -344,7 +344,7 @@ class SwiftTests(object): '.is_multiple_swift_store_accounts_enabled', mock.Mock(return_value=False)) def test_add(self): - """Test that we can add an image via the swift backend""" + """Test that we can add an image via the swift backend.""" reload(swift) self.store = Store(self.conf) self.store.configure() @@ -775,7 +775,7 @@ class TestStoreAuthV1(base.StoreBaseTest, SwiftTests): return conf def setUp(self): - """Establish a clean test environment""" + """Establish a clean test environment.""" super(TestStoreAuthV1, self).setUp() conf = self.getConfig() diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index f08345e..6bfb089 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -19,7 +19,7 @@ from glance_store.common import utils class TestUtils(base.BaseTestCase): - """Test routines in glance_store.common.utils""" + """Test routines in glance_store.common.utils.""" def test_exception_to_str(self): class FakeException(Exception): diff --git a/tests/unit/test_vmware_store.py b/tests/unit/test_vmware_store.py index a952d83..df04045 100644 --- a/tests/unit/test_vmware_store.py +++ b/tests/unit/test_vmware_store.py @@ -81,7 +81,7 @@ class TestStore(base.StoreBaseTest): @mock.patch('oslo.vmware.api.VMwareAPISession', auptospec=True) def setUp(self, mock_session): - """Establish a clean test environment""" + """Establish a clean test environment.""" super(TestStore, self).setUp() vm_store.Store.CHUNKSIZE = 2 @@ -131,7 +131,7 @@ class TestStore(base.StoreBaseTest): vm_store.Store._build_vim_cookie_header = mock.Mock() def test_get(self): - """Test a "normal" retrieval of an image in chunks""" + """Test a "normal" retrieval of an image in chunks.""" expected_image_size = 31 expected_returns = ['I ', 'am', ' a', ' t', 'ea', 'po', 't,', ' s', 'ho', 'rt', ' a', 'nd', ' s', 'to', 'ut', '\n'] @@ -158,7 +158,7 @@ class TestStore(base.StoreBaseTest): @mock.patch.object(vm_store._Reader, 'size') def test_add(self, fake_size): - """Test that we can add an image via the VMware backend""" + """Test that we can add an image via the VMware backend.""" expected_image_id = str(uuid.uuid4()) expected_size = FIVE_KB expected_contents = "*" * expected_size @@ -215,7 +215,7 @@ class TestStore(base.StoreBaseTest): self.assertEqual(expected_checksum, checksum) def test_delete(self): - """Test we can delete an existing image in the VMware store""" + """Test we can delete an existing image in the VMware store.""" loc = get_location_from_uri( "vsphere://127.0.0.1/folder/openstack_glance/%s?" "dsName=ds1&dcPath=dc1" % FAKE_UUID) @@ -228,7 +228,9 @@ class TestStore(base.StoreBaseTest): self.assertRaises(exceptions.NotFound, self.store.get, loc) def test_get_size(self): - """Test we can get the size of an existing image in the VMware store""" + """ + Test we can get the size of an existing image in the VMware store + """ loc = get_location_from_uri( "vsphere://127.0.0.1/folder/openstack_glance/%s" "?dsName=ds1&dcPath=dc1" % FAKE_UUID) |