[asterisk-commits] mnick: branch mnick/gsoc2010 r732 - /asterisk/team/mnick/gsoc2010/trunk/tests...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 16 14:22:52 CDT 2010
Author: mnick
Date: Mon Aug 16 14:22:49 2010
New Revision: 732
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=732
Log:
cleaned the code
Modified:
asterisk/team/mnick/gsoc2010/trunk/tests/callparking/run-test
Modified: asterisk/team/mnick/gsoc2010/trunk/tests/callparking/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnick/gsoc2010/trunk/tests/callparking/run-test?view=diff&rev=732&r1=731&r2=732
==============================================================================
--- asterisk/team/mnick/gsoc2010/trunk/tests/callparking/run-test (original)
+++ asterisk/team/mnick/gsoc2010/trunk/tests/callparking/run-test Mon Aug 16 14:22:49 2010
@@ -31,7 +31,7 @@
# get version info
parser = OptionParser()
- parser.add_option("-v", "--version", dest="ast_version", \
+ parser.add_option("-v", "--version", dest="ast_version",
help="Asterisk version string")
(options, args) = parser.parse_args(argv)
self.ast_version = AsteriskVersion(options.ast_version)
@@ -44,60 +44,60 @@
self.agi_c = fastagi.FastAGIFactory(self.get_result_c)
reactor.listenTCP(4575, self.agi_c, self.timeout, '127.0.0.1')
- self.agi_retrieve_A = fastagi.FastAGIFactory( \
+ self.agi_retrieve_A = fastagi.FastAGIFactory(
self.get_result_retrieve_A)
reactor.listenTCP(4576, self.agi_retrieve_A, self.timeout, '127.0.0.1')
- self.agi_retrieve_B = fastagi.FastAGIFactory( \
+ self.agi_retrieve_B = fastagi.FastAGIFactory(
self.get_result_retrieve_B)
reactor.listenTCP(4577, self.agi_retrieve_B, self.timeout, '127.0.0.1')
reactor.callWhenRunning(self.run)
- self.asterisk1 = Asterisk( \
+ self.asterisk1 = Asterisk(
base="/tmp/asterisk-testsuite/callparking/asterisk1")
self.asterisk1.install_configs("tests/callparking/configs")
- self.asterisk2 = Asterisk( \
+ self.asterisk2 = Asterisk(
base="/tmp/asterisk-testsuite/callparking/asterisk2")
self.asterisk2.install_configs("tests/callparking/configs2")
- self.asterisk3 = Asterisk( \
+ self.asterisk3 = Asterisk(
base="/tmp/asterisk-testsuite/callparking/asterisk3")
self.asterisk3.install_configs("tests/callparking/configs3")
# This gets invoked by the dialplan when userB has parked userA to 701.
# Initiate new call userB <--> userC now.
def get_result_b(self, agi):
- self.log_last_step("got AGI connection from userB. \
- Initiate new call between userB and userC now")
- self.asterisk1.cli_originate("IAX2/userB at 127.0.0.1:4572/c_exten \
- extension bridge_to_B at parking")
+ self.log_last_step("got AGI connection from userB. "
+ "Initiate new call between userB and userC now")
+ self.asterisk1.cli_originate(
+ "IAX2/userB at 127.0.0.1:4572/c_exten extension bridge_to_B at parking")
return self.finish_agi(agi)
# This gets invoked by the dialplan when userC has parked userB to 702.
# Initiate new call between userC and parked userA (@701) now.
def get_result_c(self, agi):
- self.log_last_step("got AGI connection from userC. \
- Now retrieve userA -> call 701")
- self.asterisk3.cli_originate("IAX2/userA at 127.0.0.1:4570/701 \
- extension retrieve_A at parking")
+ self.log_last_step("got AGI connection from userC. "
+ "Now retrieve userA -> call 701")
+ self.asterisk3.cli_originate(
+ "IAX2/userA at 127.0.0.1:4570/701 extension retrieve_A at parking")
return self.finish_agi(agi)
# This gets invoked by the dialplan when userC has retrieved userA.
# Initiate new call between userC and parked userB (@702) now.
def get_result_retrieve_A(self, agi):
- self.log_last_step("got AGI connection from userC. \
- userA retrieved successfully, now retrieve userB")
- self.asterisk3.cli_originate("IAX2/userA at 127.0.0.1:4570/702 \
- extension retrieve_B at parking")
+ self.log_last_step("got AGI connection from userC. "
+ "userA retrieved successfully, now retrieve userB")
+ self.asterisk3.cli_originate(
+ "IAX2/userA at 127.0.0.1:4570/702 extension retrieve_B at parking")
return self.finish_agi(agi)
# This gets invoked by the dialplan when userC has retrieved userB.
# Test successful!
def get_result_retrieve_B(self, agi):
- self.log_last_step("got AGI connection from userC. \
- userB retrieved successfully -> Test successful")
+ self.log_last_step("got AGI connection from userC. "
+ "userB retrieved successfully -> Test successful")
self.passed = True
reactor.callLater(2, self.read_result)
return self.finish_agi(agi)
@@ -128,8 +128,8 @@
if (self.passed):
self.log_last_step("Test Passed...")
else:
- self.log_last_step("Test Failed... view result of \
- 'core show globals' in log for more detailed failure results.")
+ self.log_last_step("Test Failed... view result of "
+ "'core show globals' in log for more detailed failure results.")
if reactor.running:
print "Stopping Reactor ..."
@@ -149,8 +149,8 @@
self.asterisk3.cli_exec("core set verbose 10")
self.log_last_step("Originating call to begin test")
- self.asterisk1.cli_originate("IAX2/userA at 127.0.0.1:4571/b_exten \
- extension bridge_to_A at parking")
+ self.asterisk1.cli_originate(
+ "IAX2/userA at 127.0.0.1:4571/b_exten extension bridge_to_A at parking")
def start_asterisk(self):
self.log_last_step("Starting Asterisk")
More information about the asterisk-commits
mailing list