[asterisk-commits] mjordan: testsuite/asterisk/trunk r4071 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Aug 25 16:46:07 CDT 2013


Author: mjordan
Date: Sun Aug 25 16:46:05 2013
New Revision: 4071

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4071
Log:
Allow for asynchronous origination of the test calls in SimpleTestCase

Pass the 'asynch' keyword from the YAML file to the AMI library to allow for
asynchronous origination of the test call. This is particularly needed to just
how much stuff a synchronous Origination can block.

Modified:
    asterisk/trunk/lib/python/asterisk/SimpleTestCase.py

Modified: asterisk/trunk/lib/python/asterisk/SimpleTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/SimpleTestCase.py?view=diff&rev=4071&r1=4070&r2=4071
==============================================================================
--- asterisk/trunk/lib/python/asterisk/SimpleTestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/SimpleTestCase.py Sun Aug 25 16:46:05 2013
@@ -95,20 +95,24 @@
         # unique ID we've assigned, allowing us to associate the Asterisk
         # channel name with the channel we originated
         msg = "Originating call to %s" % call_details['channel']
+        if 'async' not in call_details:
+            call_details['async'] = False
         if 'application' in call_details:
             msg += " with application %s" % call_details['application']
-            df = ami.originate(channel = call_details['channel'],
-                          application = call_details['application'],
-                          variable = call_details['variable'])
+            df = ami.originate(channel=call_details['channel'],
+                          application=call_details['application'],
+                          variable=call_details['variable'],
+                          async=call_details['async'])
         else:
             msg += " to %s@%s at %s" % (call_details['exten'],
                                         call_details['context'],
                                         call_details['priority'],)
-            df = ami.originate(channel = call_details['channel'],
-                          context = call_details['context'],
-                          exten = call_details['exten'],
-                          priority = call_details['priority'],
-                          variable = call_details['variable'])
+            df = ami.originate(channel=call_details['channel'],
+                          context=call_details['context'],
+                          exten=call_details['exten'],
+                          priority=call_details['priority'],
+                          variable=call_details['variable'],
+                          async=call_details['async'])
         if self._ignore_originate_failures:
             df.addErrback(__swallow_originate_error)
         else:




More information about the asterisk-commits mailing list