[svn-commits] mjordan: testsuite/asterisk/trunk r5484 - /asterisk/trunk/tests/rest_api/dang...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Aug 17 20:10:21 CDT 2014
Author: mjordan
Date: Sun Aug 17 20:10:19 2014
New Revision: 5484
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5484
Log:
rest_api/danger/safe: Update test to expect error response
When a dangerous function is executed, it now returns a 500 response. The
function itself is blocked and cannot be read from. This patch updates
the test to expect that failure.
Modified:
asterisk/trunk/tests/rest_api/danger/safe/safe.py
Modified: asterisk/trunk/tests/rest_api/danger/safe/safe.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/danger/safe/safe.py?view=diff&rev=5484&r1=5483&r2=5484
==============================================================================
--- asterisk/trunk/tests/rest_api/danger/safe/safe.py (original)
+++ asterisk/trunk/tests/rest_api/danger/safe/safe.py Sun Aug 17 20:10:19 2014
@@ -20,9 +20,10 @@
actual = resp.json()["value"]
eq('works', actual)
+ ari.set_allow_errors(True)
resp = ari.get('channels', channel_id, 'variable', variable='SHELL(echo -n fail)')
- actual = resp.json()["value"]
- eq('', actual)
+ ari.set_allow_errors(False)
+ eq(500, resp.status_code)
def on_start(ari, event, test_object):
More information about the svn-commits
mailing list