[asterisk-commits] kmoore: testsuite/asterisk/trunk r3118 - /asterisk/trunk/tests/channels/SIP/g...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 21 13:00:01 CDT 2012


Author: kmoore
Date: Wed Mar 21 12:59:57 2012
New Revision: 3118

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3118
Log:
Ensure the CCSS test uses AMI on the correct Asterisk instance

There was a bug in the CCSS test that only manifested when call identifiers
differed between the instances where it pulled a channel listing on one
instance and issued a hangup to the other instance.

Modified:
    asterisk/trunk/tests/channels/SIP/generic_ccss/run-test

Modified: asterisk/trunk/tests/channels/SIP/generic_ccss/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/generic_ccss/run-test?view=diff&rev=3118&r1=3117&r2=3118
==============================================================================
--- asterisk/trunk/tests/channels/SIP/generic_ccss/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/generic_ccss/run-test Wed Mar 21 12:59:57 2012
@@ -79,10 +79,10 @@
 
     def status_callback(self, result):
         # hangup all channels listed on the second instance
-        def hangupchan(status_result):
-            if status_result['context'] == 'bob-incoming':
-                self.ami[1].hangup(status_result['channel'])
-        [hangupchan(i) for i in result]
+        for status_result in result:
+            if 'context' in status_result and
+                status_result['context'] == 'bob-incoming':
+                self.ami[0].hangup(status_result['channel'])
 
     def status_failed(self, reason):
         pass




More information about the asterisk-commits mailing list