[Asterisk-code-review] test case.py: Fix PEP8 warnings. (testsuite[master])
Richard Mudgett
asteriskteam at digium.com
Thu Dec 1 13:36:35 CST 2016
Richard Mudgett has uploaded a new change for review. ( https://gerrit.asterisk.org/4544 )
Change subject: test_case.py: Fix PEP8 warnings.
......................................................................
test_case.py: Fix PEP8 warnings.
Change-Id: If1c0767e5747ac61dd2427a1ffa589985b77b655
---
M lib/python/asterisk/test_case.py
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/44/4544/1
diff --git a/lib/python/asterisk/test_case.py b/lib/python/asterisk/test_case.py
index 9fc07cc..11fa3e9 100644
--- a/lib/python/asterisk/test_case.py
+++ b/lib/python/asterisk/test_case.py
@@ -206,8 +206,8 @@
# Get those global conditions that are not in the self conditions
for g_cond in global_conditions:
disallowed = [i for i in conditions
- if i[0].get_name() == g_cond[0].get_name()
- and i[1] == g_cond[1]]
+ if i[0].get_name() == g_cond[0].get_name() and
+ i[1] == g_cond[1]]
if len(disallowed) == 0:
conditions.append(g_cond)
@@ -232,7 +232,7 @@
Asterisk instances have been specified
"""
if (self.global_config.config and
- 'asterisk-instances' in self.global_config.config):
+ 'asterisk-instances' in self.global_config.config):
asterisks = self.global_config.config.get('asterisk-instances')
else:
asterisks = [{'num': i + 1, 'host': '127.0.0.%d' % (i + 1)}
@@ -316,7 +316,7 @@
LOGGER.info("Creating AMIFactory %d to %s" % ((i + 1), host))
try:
ami_factory = manager.AMIFactory(actual_user, actual_secret, i,
- on_reconnect=on_reconnect)
+ on_reconnect=on_reconnect)
except:
ami_factory = manager.AMIFactory(actual_user, actual_secret, i)
deferred = ami_factory.login(ip=host, port=actual_port)
@@ -690,7 +690,7 @@
Keyword Arguments:
fail_token A previously created fail token to be removed from the test
"""
- if not fail_token in self.fail_tokens:
+ if fail_token not in self.fail_tokens:
LOGGER.warning('Attempted to remove an unknown fail token: %s',
fail_token['message'])
self.passed = False
@@ -847,8 +847,8 @@
# There should only ever be one match, since we're
# selecting on a UUID
originating_channel = [chan for chan in self._test_runs
- if (chan['variable']['testuniqueid']
- == event['value'])][0]
+ if (chan['variable']['testuniqueid'] ==
+ event['value'])][0]
self._tracking_channels.append({
'channel': event['channel'],
'testuniqueid': event['value'],
--
To view, visit https://gerrit.asterisk.org/4544
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If1c0767e5747ac61dd2427a1ffa589985b77b655
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list