[asterisk-commits] kmoore: testsuite/asterisk/trunk r3616 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 22 14:06:25 CST 2013


Author: kmoore
Date: Tue Jan 22 14:06:22 2013
New Revision: 3616

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3616
Log:
Give an event description when failing a test

This allows the offending event to be discerned on failure without
digging through large log files.

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

Modified: asterisk/trunk/lib/python/asterisk/ami.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/ami.py?view=diff&rev=3616&r1=3615&r2=3616
==============================================================================
--- asterisk/trunk/lib/python/asterisk/ami.py (original)
+++ asterisk/trunk/lib/python/asterisk/ami.py Tue Jan 22 14:06:22 2013
@@ -20,6 +20,7 @@
         self.match_conditions = instance_config['conditions']['match']
         self.nonmatch_conditions = instance_config['conditions'].get('nomatch', {})
         self.ids = instance_config['id'].split(',') if 'id' in instance_config else ['0']
+        self.config = instance_config
         self.passed = True
         self._registered = False
 
@@ -131,6 +132,7 @@
                 or self.event_count < self.count_min):
             logger.warning("Event occurred %d times, which is out of the"
                     " allowable range" % self.event_count)
+            logger.warning("Event description: %s" % (str(self.config)))
             self.test_object.set_passed(False)
             return callback_param
         return self.check_result(callback_param)




More information about the asterisk-commits mailing list