[asterisk-commits] dlee: testsuite/asterisk/trunk r4398 - in /asterisk/trunk/tests/rest_api: app...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 5 14:45:13 CST 2013


Author: dlee
Date: Thu Dec  5 14:45:11 2013
New Revision: 4398

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4398
Log:
Fix test callbacks that were missing test_object parameters.

Modified:
    asterisk/trunk/tests/rest_api/applications/errors/errors.py
    asterisk/trunk/tests/rest_api/applications/subscribe-bridge/subscribe_bridge.py
    asterisk/trunk/tests/rest_api/applications/subscribe-channel/subscribe_channel.py
    asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py

Modified: asterisk/trunk/tests/rest_api/applications/errors/errors.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/applications/errors/errors.py?view=diff&rev=4398&r1=4397&r2=4398
==============================================================================
--- asterisk/trunk/tests/rest_api/applications/errors/errors.py (original)
+++ asterisk/trunk/tests/rest_api/applications/errors/errors.py Thu Dec  5 14:45:11 2013
@@ -21,7 +21,7 @@
         raise ValueError('Test failed')
 
 
-def on_start(ari, event):
+def on_start(ari, event, test_object):
     LOGGER.debug('on_start(%r)' % event)
 
     channel_id = event["channel"]["id"]

Modified: asterisk/trunk/tests/rest_api/applications/subscribe-bridge/subscribe_bridge.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/applications/subscribe-bridge/subscribe_bridge.py?view=diff&rev=4398&r1=4397&r2=4398
==============================================================================
--- asterisk/trunk/tests/rest_api/applications/subscribe-bridge/subscribe_bridge.py (original)
+++ asterisk/trunk/tests/rest_api/applications/subscribe-bridge/subscribe_bridge.py Thu Dec  5 14:45:11 2013
@@ -19,7 +19,7 @@
 TEST = SubscribeBridge()
 
 
-def on_start(ari, event):
+def on_start(ari, event, test_object):
     TEST.channel_id = event['channel']['id']
     TEST.bridge_id = ari.post('bridges').json()['id']
     ari.post('applications', 'bridge-watching-app', 'subscription',
@@ -29,7 +29,7 @@
     return True
 
 
-def on_enter_testsuite(ari, event):
+def on_enter_testsuite(ari, event, test_object):
     assert TEST.bridge_id == event['bridge']['id']
     assert TEST.channel_id == event['channel']['id']
     # Unsubscribe testsuite from the bridge
@@ -38,7 +38,7 @@
     return True
 
 
-def on_enter_watcher(ari, event):
+def on_enter_watcher(ari, event, test_object):
     assert TEST.bridge_id == event['bridge']['id']
     assert TEST.channel_id == event['channel']['id']
     ari.post('bridges', TEST.bridge_id, 'removeChannel',
@@ -46,7 +46,7 @@
     return True
 
 
-def on_channel_left_bridge(ari, event):
+def on_channel_left_bridge(ari, event, test_object):
     assert TEST.bridge_id == event['bridge']['id']
     assert TEST.channel_id == event['channel']['id']
     ari.delete('channels', TEST.channel_id);

Modified: asterisk/trunk/tests/rest_api/applications/subscribe-channel/subscribe_channel.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/applications/subscribe-channel/subscribe_channel.py?view=diff&rev=4398&r1=4397&r2=4398
==============================================================================
--- asterisk/trunk/tests/rest_api/applications/subscribe-channel/subscribe_channel.py (original)
+++ asterisk/trunk/tests/rest_api/applications/subscribe-channel/subscribe_channel.py Thu Dec  5 14:45:11 2013
@@ -19,7 +19,7 @@
 TEST = TestData()
 
 
-def on_start(ari, event):
+def on_start(ari, event, test_object):
     LOGGER.debug("on_start(%r)" % event)
     TEST.channel_id = event["channel"]["id"]
     ari.post("applications", "testsuite", "subscription",
@@ -28,13 +28,13 @@
     return True
 
 
-def on_end(ari, event):
+def on_end(ari, event, test_object):
     LOGGER.debug("on_end(%r)" % event)
     TEST.has_ended = True
     return True
 
 
-def on_state_change(ari, event):
+def on_state_change(ari, event, test_object):
     LOGGER.debug("on_state_change(%r)" % event)
     assert TEST.has_ended, "Expected no state changes before StasisEnd"
     return True

Modified: asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py?view=diff&rev=4398&r1=4397&r2=4398
==============================================================================
--- asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py (original)
+++ asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py Thu Dec  5 14:45:11 2013
@@ -23,7 +23,7 @@
 TEST = BridgeSimple()
 
 
-def on_start(ari, event):
+def on_start(ari, event, test_object):
     """
     Called when the channel enters the Stasis application. This function will
     create a bridge and add the channel to the bridge.
@@ -36,7 +36,7 @@
     return True
 
 
-def on_enter(ari, event):
+def on_enter(ari, event, test_object):
     """
     Called when the channel enters the bridge. This function will remove the
     bridge from the system.
@@ -49,7 +49,7 @@
     return True
 
 
-def on_destroy(ari, event):
+def on_destroy(ari, event, test_object):
     """
     Called when the bridge is destroyed. This function checks that the bridge
     no longer exists in the system but that the channel that was in the bridge




More information about the asterisk-commits mailing list