Enable E241 check
It can be enabled by a few adjustments. Change-Id: I03260f6ecfaea3e6cb70a53e9dea1011a6168668 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
3
tox.ini
3
tox.ini
@@ -93,12 +93,11 @@ enable-extensions=H904
|
|||||||
# Ignored extensions, might be enabled again after review:
|
# Ignored extensions, might be enabled again after review:
|
||||||
# E123 closing bracket does not match indentation of opening bracket's line
|
# E123 closing bracket does not match indentation of opening bracket's line
|
||||||
# E226 missing whitespace around arithmetic operator
|
# E226 missing whitespace around arithmetic operator
|
||||||
# E241 multiple spaces after ','
|
|
||||||
# E402 module level import not at top of file
|
# E402 module level import not at top of file
|
||||||
# E731 do not assign a lambda expression, use a def
|
# E731 do not assign a lambda expression, use a def
|
||||||
# W503 line break before binary operator
|
# W503 line break before binary operator
|
||||||
# W504 line break after binary operator
|
# W504 line break after binary operator
|
||||||
ignore = E123,E226,E241,E402,E731,W503,W504
|
ignore = E123,E226,E402,E731,W503,W504
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
# File extensions to check
|
# File extensions to check
|
||||||
|
@@ -279,7 +279,7 @@ class ClaimsBaseTest(base.V1_1Base):
|
|||||||
req = test_utils.create_request(action, body, self.headers)
|
req = test_utils.create_request(action, body, self.headers)
|
||||||
self.protocol.onMessage(req, False)
|
self.protocol.onMessage(req, False)
|
||||||
resp = jsonutils.loads(send_mock.call_args[0][0])
|
resp = jsonutils.loads(send_mock.call_args[0][0])
|
||||||
self.assertEqual(403, resp['headers']['status'])
|
self.assertEqual(403, resp['headers']['status'])
|
||||||
|
|
||||||
# Delete the message and its associated claim
|
# Delete the message and its associated claim
|
||||||
body = {"queue_name": "skittle",
|
body = {"queue_name": "skittle",
|
||||||
@@ -303,7 +303,7 @@ class ClaimsBaseTest(base.V1_1Base):
|
|||||||
req = test_utils.create_request(action, body, headers)
|
req = test_utils.create_request(action, body, headers)
|
||||||
self.protocol.onMessage(req, False)
|
self.protocol.onMessage(req, False)
|
||||||
resp = jsonutils.loads(send_mock.call_args[0][0])
|
resp = jsonutils.loads(send_mock.call_args[0][0])
|
||||||
self.assertEqual(404, resp['headers']['status'])
|
self.assertEqual(404, resp['headers']['status'])
|
||||||
|
|
||||||
# Get the message
|
# Get the message
|
||||||
action = consts.MESSAGE_GET
|
action = consts.MESSAGE_GET
|
||||||
@@ -382,7 +382,7 @@ class ClaimsBaseTest(base.V1_1Base):
|
|||||||
req = test_utils.create_request(action, body, self.headers)
|
req = test_utils.create_request(action, body, self.headers)
|
||||||
self.protocol.onMessage(req, False)
|
self.protocol.onMessage(req, False)
|
||||||
resp = jsonutils.loads(send_mock.call_args[0][0])
|
resp = jsonutils.loads(send_mock.call_args[0][0])
|
||||||
self.assertEqual(404, resp['headers']['status'])
|
self.assertEqual(404, resp['headers']['status'])
|
||||||
|
|
||||||
# Try to update a claim that doesn't exist
|
# Try to update a claim that doesn't exist
|
||||||
action = consts.CLAIM_UPDATE
|
action = consts.CLAIM_UPDATE
|
||||||
@@ -393,7 +393,7 @@ class ClaimsBaseTest(base.V1_1Base):
|
|||||||
req = test_utils.create_request(action, body, self.headers)
|
req = test_utils.create_request(action, body, self.headers)
|
||||||
self.protocol.onMessage(req, False)
|
self.protocol.onMessage(req, False)
|
||||||
resp = jsonutils.loads(send_mock.call_args[0][0])
|
resp = jsonutils.loads(send_mock.call_args[0][0])
|
||||||
self.assertEqual(404, resp['headers']['status'])
|
self.assertEqual(404, resp['headers']['status'])
|
||||||
|
|
||||||
def test_post_claim_nonexistent_queue(self):
|
def test_post_claim_nonexistent_queue(self):
|
||||||
action = consts.CLAIM_CREATE
|
action = consts.CLAIM_CREATE
|
||||||
@@ -420,7 +420,7 @@ class ClaimsBaseTest(base.V1_1Base):
|
|||||||
req = test_utils.create_request(action, body, self.headers)
|
req = test_utils.create_request(action, body, self.headers)
|
||||||
self.protocol.onMessage(req, False)
|
self.protocol.onMessage(req, False)
|
||||||
resp = jsonutils.loads(send_mock.call_args[0][0])
|
resp = jsonutils.loads(send_mock.call_args[0][0])
|
||||||
self.assertEqual(404, resp['headers']['status'])
|
self.assertEqual(404, resp['headers']['status'])
|
||||||
|
|
||||||
def _get_a_claim(self):
|
def _get_a_claim(self):
|
||||||
action = consts.CLAIM_CREATE
|
action = consts.CLAIM_CREATE
|
||||||
|
@@ -504,7 +504,7 @@ class TestQueueLifecycleMongoDB(base.V2Base):
|
|||||||
'_dead_letter_queue': None,
|
'_dead_letter_queue': None,
|
||||||
'_dead_letter_queue_messages_ttl': None,
|
'_dead_letter_queue_messages_ttl': None,
|
||||||
'_max_claim_count': None,
|
'_max_claim_count': None,
|
||||||
'_enable_encrypt_messages': False}, result_doc)
|
'_enable_encrypt_messages': False}, result_doc)
|
||||||
|
|
||||||
# queue filter
|
# queue filter
|
||||||
result = self.simulate_get(self.queue_path, headers=header,
|
result = self.simulate_get(self.queue_path, headers=header,
|
||||||
|
@@ -480,7 +480,7 @@ class TestTopicLifecycleMongoDB(base.V2Base):
|
|||||||
self.assertEqual(topic['metadata'], result_doc)
|
self.assertEqual(topic['metadata'], result_doc)
|
||||||
self.assertEqual({'node': 31, '_default_message_ttl': 3600,
|
self.assertEqual({'node': 31, '_default_message_ttl': 3600,
|
||||||
'_max_messages_post_size': 262144,
|
'_max_messages_post_size': 262144,
|
||||||
'_default_message_delay': 0}, result_doc)
|
'_default_message_delay': 0}, result_doc)
|
||||||
|
|
||||||
# topic filter
|
# topic filter
|
||||||
result = self.simulate_get(self.topic_path, headers=header,
|
result = self.simulate_get(self.topic_path, headers=header,
|
||||||
|
Reference in New Issue
Block a user