[asterisk-commits] pabelanger: branch group/python_logging r1983 - in /asterisk/team/group/pytho...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 26 15:34:42 CDT 2011
Author: pabelanger
Date: Fri Aug 26 15:34:35 2011
New Revision: 1983
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1983
Log:
Merged revisions 1917,1920,1930,1940,1949,1962,1974 via svnmerge from
https://origsvn.digium.com/svn/testsuite/asterisk/trunk
........
r1917 | pabelanger | 2011-08-25 14:07:26 -0400 (Thu, 25 Aug 2011) | 2 lines
Because some test still pass the workingdir, strip it
........
r1920 | pabelanger | 2011-08-25 14:16:16 -0400 (Thu, 25 Aug 2011) | 2 lines
Revert previous commit
........
r1930 | pabelanger | 2011-08-25 15:28:01 -0400 (Thu, 25 Aug 2011) | 2 lines
Write results to logfile before displaying them
........
r1940 | pabelanger | 2011-08-25 17:59:29 -0400 (Thu, 25 Aug 2011) | 7 lines
Remove '/tmp/asterisk-testsuite' path from tests
This patch removes the hard-coded path for the base direcorty. This fixes a bug
when generating our sandboxed instances of Asterisk. Additionally, tests should
not be using hard-coded paths; yuck.
........
r1949 | pabelanger | 2011-08-26 10:19:59 -0400 (Fri, 26 Aug 2011) | 2 lines
Temporary disable sip_tls
........
r1962 | pabelanger | 2011-08-26 14:55:29 -0400 (Fri, 26 Aug 2011) | 13 lines
Remove OptionParser from tests
This patch removes the ability to pass command-line arguements to test. Not only
is this a sloppy way of doing things, 95% of the time is was not even required.
Because some tests used the ast_version from the argv parameter, we've added the
cli_aliases.conf file to help with CLI syntax.
Additionall, I've removed valgrid support (was not used for anything) until we
decided how to find a better solution for it. Ideally, the testsuite will have
a .config file all tests can access for global settings.
Review: https://reviewboard.asterisk.org/r/1386/
........
r1974 | pabelanger | 2011-08-26 16:04:03 -0400 (Fri, 26 Aug 2011) | 2 lines
Fix typo from previous commit
........
Modified:
asterisk/team/group/python_logging/ (props changed)
asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py
asterisk/team/group/python_logging/tests/apps/voicemail/leave_voicemail_nominal/run-test
asterisk/team/group/python_logging/tests/channels/SIP/sip_srtp/run-test
asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/run-test
asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/test-config.yaml
asterisk/team/group/python_logging/tests/dynamic-modules/run-test
asterisk/team/group/python_logging/tests/fastagi/channel-status/run-test
asterisk/team/group/python_logging/tests/fastagi/connect/run-test
asterisk/team/group/python_logging/tests/fastagi/control-stream-file/run-test
asterisk/team/group/python_logging/tests/fastagi/database/run-test
asterisk/team/group/python_logging/tests/fastagi/stream-file/run-test
asterisk/team/group/python_logging/tests/fax/gateway_g711_t38/run-test
asterisk/team/group/python_logging/tests/fax/gateway_mix1/run-test
asterisk/team/group/python_logging/tests/fax/gateway_mix2/run-test
asterisk/team/group/python_logging/tests/fax/gateway_mix3/run-test
asterisk/team/group/python_logging/tests/fax/gateway_mix4/run-test
asterisk/team/group/python_logging/tests/fax/gateway_native_t38/run-test
asterisk/team/group/python_logging/tests/fax/gateway_native_t38_ced/run-test
asterisk/team/group/python_logging/tests/fax/gateway_no_t38/run-test
asterisk/team/group/python_logging/tests/fax/gateway_t38_g711/run-test
asterisk/team/group/python_logging/tests/fax/gateway_timeout1/run-test
asterisk/team/group/python_logging/tests/fax/gateway_timeout2/run-test
asterisk/team/group/python_logging/tests/fax/gateway_timeout3/run-test
asterisk/team/group/python_logging/tests/fax/gateway_timeout4/run-test
asterisk/team/group/python_logging/tests/fax/gateway_timeout5/run-test
asterisk/team/group/python_logging/tests/func_srv/run-test
asterisk/team/group/python_logging/tests/manager/login/run-test
asterisk/team/group/python_logging/tests/pbx/merge_contexts/run-test
asterisk/team/group/python_logging/tests/pbx/pbx_lua_background/run-test
asterisk/team/group/python_logging/tests/pbx/pbx_lua_goto/run-test
asterisk/team/group/python_logging/tests/regressions/M18882/run-test
asterisk/team/group/python_logging/tests/udptl/run-test
Propchange: asterisk/team/group/python_logging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Aug 26 15:34:35 2011
@@ -1,1 +1,1 @@
-/asterisk/trunk:1-1911
+/asterisk/trunk:1-1911,1917-1974
Modified: asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py (original)
+++ asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py Fri Aug 26 15:34:35 2011
@@ -9,6 +9,7 @@
import sys
import logging, logging.config
+import logging.config
import os
from twisted.internet import reactor
from starpy import manager, fastagi
Modified: asterisk/team/group/python_logging/tests/apps/voicemail/leave_voicemail_nominal/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/apps/voicemail/leave_voicemail_nominal/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/apps/voicemail/leave_voicemail_nominal/run-test (original)
+++ asterisk/team/group/python_logging/tests/apps/voicemail/leave_voicemail_nominal/run-test Fri Aug 26 15:34:35 2011
@@ -53,14 +53,12 @@
df = ami.originate("sip/ast1/" + str(extension), "sendvoicemail", str(extension), 1, None, "CallId-" + str(extension), None, None, None, {}, True )
df.addErrback(self.handleOriginateFailure)
-
def handleOriginateFailure(self, reason):
logger.error("Error sending originate:")
logger.error(reason.getTraceback())
self.stop_reactor()
return reason
-
def user_event(self, ami, event):
if event['userevent'] != 'TestResult':
Modified: asterisk/team/group/python_logging/tests/channels/SIP/sip_srtp/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/channels/SIP/sip_srtp/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/channels/SIP/sip_srtp/run-test (original)
+++ asterisk/team/group/python_logging/tests/channels/SIP/sip_srtp/run-test Fri Aug 26 15:34:35 2011
@@ -16,8 +16,8 @@
from asterisk.TestCase import TestCase
class SIPCallTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.connected_chan1 = False
self.connected_chan2 = False
@@ -75,10 +75,8 @@
print "Test passed"
self.passed = True
-def main(argv=None):
- if argv is None:
- argv = sys.argv
- test = SIPCallTest(argv)
+def main():
+ test = SIPCallTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/run-test (original)
+++ asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/run-test Fri Aug 26 15:34:35 2011
@@ -14,7 +14,7 @@
from asterisk.cdr import AsteriskCSVCDR, AsteriskCSVCDRLine
from starpy import manager
-#Quick little function for doing search and replace in a file used below.
+# Quick little function for doing search and replace in a file used below.
def file_replace_string(file, search, replace):
for line in fileinput.input(file, inplace=1):
if search in line:
@@ -28,22 +28,22 @@
"""
class SIPTLSCallTest(TestCase):
- #Preps test objects and configuration additions as well as copies TLS keys to test folder.
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ # Preps test objects and configuration additions as well as copies TLS keys to test folder.
+ def __init__(self):
+ TestCase.__init__(self)
print "Creating Asterisk instances ..."
self.create_asterisk(2)
- workingdir = "/tmp/asterisk-testsuite/channels/SIP/sip_tls_call"
- testdir = "tests/channels/SIP/sip_tls_call"
+ workingdir = "channels/SIP/sip_tls_call"
+ testdir = "tests/%s" % workingdir
- #initialize test variables
+ # initialize test variables
self.passed = False
self.tone1 = False
self.tone2 = False
- #Additional setup for config files and keys
+ # Additional setup for config files and keys
print "Building test resources ..."
shutil.copy('%s/configs/helper1' % (testdir), '%s/configs/ast1/sip_helper.inc' % (testdir))
shutil.copy('%s/configs/helper2' % (testdir), '%s/configs/ast2/sip_helper.inc' % (testdir))
@@ -55,25 +55,23 @@
if os.path.exists('%s/keys' % (workingdir)):
shutil.rmtree('%s/keys' % (workingdir))
shutil.copytree('%s/configs/keys' % (testdir), '%s/keys' % (workingdir))
- #End of additional setup for config files and keys
+ # End of additional setup for config files and keys
-
-
- #Once the AMI Factory connects to the AMI, this function fires.
+ # Once the AMI Factory connects to the AMI, this function fires.
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
print "AMI %d - connected, registering DTMF event..." % (ami.id + 1)
- #This will make the manager listen for DTMF and callback ami_test when it sees some.
+ # This will make the manager listen for DTMF and callback ami_test when it sees some.
ami.registerEvent('DTMF', self.ami_test)
- if ami.id == 0: #We only want to originate the call on the ast[0]'s manager.
+ # We only want to originate the call on the ast[0]'s manager.
+ if ami.id == 0:
print "AMI - originating call from SIP/testast1 to extension 1000 using extension 1000 at priority 1"
ami.originate(channel = "SIP/testast1/1000", context = "default", exten = "1000", priority = "1")
-
- #This test is initiated whenever a DTMF event occurs.
+ # This test is initiated whenever a DTMF event occurs.
def ami_test(self, ami, event):
print "Received DTMF event from AMI %d..." % (ami.id + 1)
@@ -90,27 +88,23 @@
self.passed = True
self.stop_reactor()
-
- #Sets up reactor and AMI connection
+ # Sets up reactor and AMI connection
def run(self):
TestCase.run(self)
- self.create_ami_factory(count = 2) #will link up to ami_connect() once the connection is established
+ # will link up to ami_connect() once the connection is established
+ self.create_ami_factory(count = 2)
+def main():
+ test = SIPTLSCallTest()
+ test.start_asterisk()
+ reactor.run()
-def main(argv=None):
- if argv is None:
- argv = sys.argv
+ test.stop_asterisk()
- test = SIPTLSCallTest(argv) #initializes test (using SIPTLSCallTest.__init__(argv))
- test.start_asterisk() #starts both of the asterisk instances created in SIPTLSCallTest
- reactor.run() #connects AMI which then registers DTMF event callback.
-
- test.stop_asterisk() #Once the reactor is stopped, this will end our Asterisk instances.
-
- if test.passed: #Returns the results of the test
- return 0 #success
- return 1 #failure
+ if test.passed:
+ return 0
+ return 1
if __name__ == "__main__":
sys.exit(main() or 0)
Modified: asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/test-config.yaml?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/test-config.yaml (original)
+++ asterisk/team/group/python_logging/tests/channels/SIP/sip_tls_call/test-config.yaml Fri Aug 26 15:34:35 2011
@@ -1,4 +1,5 @@
testinfo:
+ skip: 'Skip while failures are debugged'
summary: 'Test a SIP TLS call'
description: |
'This test initiates an SIP TLS call between 2 instances of Asterisk.
Modified: asterisk/team/group/python_logging/tests/dynamic-modules/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/dynamic-modules/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/dynamic-modules/run-test (original)
+++ asterisk/team/group/python_logging/tests/dynamic-modules/run-test Fri Aug 26 15:34:35 2011
@@ -18,8 +18,8 @@
class moduleLoadUnloadTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk()
def load_module(self, module):
@@ -151,11 +151,8 @@
self.check_failures(module);
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- test = moduleLoadUnloadTest(argv)
+def main():
+ test = moduleLoadUnloadTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fastagi/channel-status/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fastagi/channel-status/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fastagi/channel-status/run-test (original)
+++ asterisk/team/group/python_logging/tests/fastagi/channel-status/run-test Fri Aug 26 15:34:35 2011
@@ -16,8 +16,8 @@
class FastAGIChannelStatusTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.passed = {'4': False, '6':False}
self.test = 4
@@ -81,11 +81,8 @@
TestCase.run(self)
self.launch_test()
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- test = FastAGIChannelStatusTest(argv)
+def main():
+ test = FastAGIChannelStatusTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fastagi/connect/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fastagi/connect/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fastagi/connect/run-test (original)
+++ asterisk/team/group/python_logging/tests/fastagi/connect/run-test Fri Aug 26 15:34:35 2011
@@ -16,8 +16,8 @@
class FastAGIConnectTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk()
self.create_fastagi_factory()
@@ -41,11 +41,8 @@
self.launch_test()
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- test = FastAGIConnectTest(argv)
+def main():
+ test = FastAGIConnectTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fastagi/control-stream-file/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fastagi/control-stream-file/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fastagi/control-stream-file/run-test (original)
+++ asterisk/team/group/python_logging/tests/fastagi/control-stream-file/run-test Fri Aug 26 15:34:35 2011
@@ -16,8 +16,8 @@
class FastAGIControlStreamFileTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk()
self.create_fastagi_factory()
@@ -27,7 +27,7 @@
self.agi.finish()
# result of 0 indicates success
- def finish_test(self,result):
+ def finish_test(self, result):
if result is "0":
self.passed = True
@@ -53,11 +53,8 @@
self.launch_test()
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- test = FastAGIControlStreamFileTest(argv)
+def main():
+ test = FastAGIControlStreamFileTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fastagi/database/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fastagi/database/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fastagi/database/run-test (original)
+++ asterisk/team/group/python_logging/tests/fastagi/database/run-test Fri Aug 26 15:34:35 2011
@@ -16,8 +16,8 @@
class FastAGIDatabaseTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.passed = {}
self.key = "fastagitest"
self.overall_result = True
@@ -166,11 +166,8 @@
self.launch_test()
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- test = FastAGIDatabaseTest(argv)
+def main():
+ test = FastAGIDatabaseTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fastagi/stream-file/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fastagi/stream-file/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fastagi/stream-file/run-test (original)
+++ asterisk/team/group/python_logging/tests/fastagi/stream-file/run-test Fri Aug 26 15:34:35 2011
@@ -16,8 +16,8 @@
class FastAGIStreamFileTest(TestCase):
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk()
self.create_fastagi_factory()
@@ -44,11 +44,8 @@
self.launch_test()
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- test = FastAGIStreamFileTest(argv)
+def main():
+ test = FastAGIStreamFileTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_g711_t38/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_g711_t38/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_g711_t38/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_g711_t38/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_mix1/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_mix1/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_mix1/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_mix1/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_mix2/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_mix2/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_mix2/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_mix2/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_mix3/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_mix3/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_mix3/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_mix3/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_mix4/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_mix4/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_mix4/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_mix4/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_native_t38/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_native_t38/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_native_t38/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_native_t38/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_native_t38_ced/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_native_t38_ced/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_native_t38_ced/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_native_t38_ced/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_no_t38/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_no_t38/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_no_t38/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_no_t38/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_t38_g711/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_t38_g711/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_t38_g711/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_t38_g711/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_timeout1/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_timeout1/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_timeout1/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_timeout1/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_timeout2/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_timeout2/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_timeout2/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_timeout2/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 120
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -94,8 +94,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_timeout3/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_timeout3/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_timeout3/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_timeout3/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 360
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -94,8 +94,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_timeout4/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_timeout4/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_timeout4/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_timeout4/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 360
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -79,8 +79,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/fax/gateway_timeout5/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/fax/gateway_timeout5/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/fax/gateway_timeout5/run-test (original)
+++ asterisk/team/group/python_logging/tests/fax/gateway_timeout5/run-test Fri Aug 26 15:34:35 2011
@@ -24,12 +24,12 @@
success_count = 0
reactor_timeout = 360
- def __init__(self, argv):
- TestCase.__init__(self, argv)
+ def __init__(self):
+ TestCase.__init__(self)
self.create_asterisk(2)
# copy the tiff file we are going to send to a good known location
- shutil.copy("%s/send.tiff" % (os.path.dirname(argv[0]),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
+ shutil.copy("%s/send.tiff" % (os.path.dirname(os.path.realpath(__file__)),), "%s%s" % (self.ast[0].base, self.ast[0].directories['astdatadir']))
def ami_connect(self, ami):
TestCase.ami_connect(self, ami)
@@ -98,8 +98,8 @@
self.create_ami_factory(2)
-def main(argv = sys.argv):
- test = GatewayTest(argv)
+def main():
+ test = GatewayTest()
test.start_asterisk()
reactor.run()
test.stop_asterisk()
Modified: asterisk/team/group/python_logging/tests/func_srv/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/tests/func_srv/run-test?view=diff&rev=1983&r1=1982&r2=1983
==============================================================================
--- asterisk/team/group/python_logging/tests/func_srv/run-test (original)
+++ asterisk/team/group/python_logging/tests/func_srv/run-test Fri Aug 26 15:34:35 2011
@@ -32,7 +32,7 @@
class func_srv_test(TestCase):
- def __init__(self, argv):
+ def __init__(self):
self.test1_records = []
self.test2_records = []
self.srv_records = []
@@ -41,7 +41,7 @@
self.srv_records.append(srv_record(3, "udpserver3.asteriskcheck.com", "5060", "1", "0"))
self.srv_records.append(srv_record(4, "udpserver4.asteriskcheck.com", "5060", "65535", "65535"))
- TestCase.__init__(self, argv)
+ TestCase.__init__(self)
self.create_asterisk()
def ami_connect(self, ami):
@@ -82,11 +82,8 @@
TestCase.run(self)
self.create_ami_factory()
[... 204 lines stripped ...]
More information about the asterisk-commits
mailing list