[Asterisk-code-review] channels/pjsip/subscriptions/mwi/mwi aggregate: Add GPL prea... (testsuite[master])
Matt Jordan
asteriskteam at digium.com
Fri May 22 09:44:35 CDT 2015
Matt Jordan has uploaded a new change for review.
https://gerrit.asterisk.org/517
Change subject: channels/pjsip/subscriptions/mwi/mwi_aggregate: Add GPL preamble; fix warnings
......................................................................
channels/pjsip/subscriptions/mwi/mwi_aggregate: Add GPL preamble; fix warnings
This patch does a minor amount of cleanup on the mwi_check pluggable
modules files for the mwi_aggregate test. It adds the necessary GPLv2
preamble, and fixes a few small warnings that a PEP8 checker caught. It
does not fix the stylistic issues, such as proper code documentation.
Change-Id: Ie8578cf734eef361b76cc5dbb857335ac89e1653
---
M tests/channels/pjsip/subscriptions/mwi/mwi_aggregate/mwi_check.py
1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/17/517/1
diff --git a/tests/channels/pjsip/subscriptions/mwi/mwi_aggregate/mwi_check.py b/tests/channels/pjsip/subscriptions/mwi/mwi_aggregate/mwi_check.py
index 3cc3261..1940cde 100644
--- a/tests/channels/pjsip/subscriptions/mwi/mwi_aggregate/mwi_check.py
+++ b/tests/channels/pjsip/subscriptions/mwi/mwi_aggregate/mwi_check.py
@@ -1,4 +1,12 @@
#!/usr/bin/env python
+"""Pluggable modules for the mwi_aggregate test
+
+Copyright (C) 2014, Digium, Inc.
+John Bigelow <jbigelow at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+"""
import sys
import logging
@@ -20,6 +28,7 @@
{'waiting': 'yes', 'msgs': '3/3'},
]
+
class PJMWICallback(pj.AccountCallback):
def __init__(self, account, results, controller):
pj.AccountCallback.__init__(self, account)
@@ -35,11 +44,11 @@
msgs = "Voice-Message: %s (0/0)\r\n" % \
self.results[self.result_pos]['msgs']
- if not waiting in body:
+ if waiting not in body:
LOGGER.error("Could not find pattern %s in MWI body %s" %
(waiting, body))
self.controller.fail_test()
- if not msgs in body:
+ if msgs not in body:
LOGGER.error("Could not find pattern %s in MWI body %s" %
(msgs, body))
self.controller.fail_test()
@@ -71,7 +80,7 @@
bob.account.set_callback(self.bob_cb)
def next_mwi(self, account):
- reactor.callFromThread(self._next_mwi_reactor, account);
+ reactor.callFromThread(self._next_mwi_reactor, account)
def _next_mwi_reactor(self, account):
account.checked_in = True
@@ -103,6 +112,7 @@
self.test_object.set_passed(False)
self.test_object.stop_reactor()
+
def mwi_callback(test_object, accounts):
cb = MWICallback(test_object, accounts)
cb.send_mwi()
--
To view, visit https://gerrit.asterisk.org/517
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8578cf734eef361b76cc5dbb857335ac89e1653
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
More information about the asterisk-code-review
mailing list