[asterisk-commits] mjordan: branch mjordan/cdr-tests r3265 - in /asterisk/team/mjordan/cdr-tests...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 18 17:09:28 CDT 2012


Author: mjordan
Date: Mon Jun 18 17:09:23 2012
New Revision: 3265

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3265
Log:
Not much started here yet...

Added:
    asterisk/team/mjordan/cdr-tests/   (props changed)
      - copied from r3264, asterisk/trunk/
Modified:
    asterisk/team/mjordan/cdr-tests/lib/python/asterisk/CDRTestCase.py

Propchange: asterisk/team/mjordan/cdr-tests/
------------------------------------------------------------------------------
    reviewboard:url = https://reviewboard.asterisk.org

Propchange: asterisk/team/mjordan/cdr-tests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jun 18 17:09:23 2012
@@ -1,0 +1,2 @@
+asterisk-test-suite-report.xml
+*.pyc

Propchange: asterisk/team/mjordan/cdr-tests/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Jun 18 17:09:23 2012
@@ -1,0 +1,2 @@
+/asterisk/team/group/cdr_test_log_congestion:1823-2951
+/asterisk/trunk:1112

Propchange: asterisk/team/mjordan/cdr-tests/
------------------------------------------------------------------------------
    svnmerge-integrated = /asterisk/trunk:1-3246

Modified: asterisk/team/mjordan/cdr-tests/lib/python/asterisk/CDRTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mjordan/cdr-tests/lib/python/asterisk/CDRTestCase.py?view=diff&rev=3265&r1=3264&r2=3265
==============================================================================
--- asterisk/team/mjordan/cdr-tests/lib/python/asterisk/CDRTestCase.py (original)
+++ asterisk/team/mjordan/cdr-tests/lib/python/asterisk/CDRTestCase.py Mon Jun 18 17:09:23 2012
@@ -19,6 +19,33 @@
 from collections import defaultdict
 
 logger = logging.getLogger(__name__)
+
+class CDRTestRun(Object):
+    ''' Class that manipulates and runs a CDR test '''
+
+    def __init__(self, yaml_config):
+        ''' Constructor
+
+        Parameters:
+        yaml_config The configuration object read from the yaml
+        '''
+        self._calls = yaml_config['']
+        self._test_case = CDRTestCase()
+
+    def run(self):
+        ''' Executes the test
+
+        Returns:
+        0 on success
+        1 on failure
+        '''
+        from twisted.internet import reactor
+        reactor.run()
+        if (self._test_case.passed):
+            return 0
+        return 1
+
+
 
 class CDRTestCase(TestCase):
     """
@@ -130,6 +157,25 @@
             application = 'Echo'
         ).addErrback(self.ami_logoff)
 
+    def originate_call_to_app(self, channel, application = 'Echo'):
+        ''' Originate a call tied to an application
+        '''
+
+        self.ami[0].originate(
+            channel = channel,
+            application = application).addErrback(self.handleOriginateFailure)
+
+    def originate_call_to_exten(self, channel, context, extension, priority):
+        ''' Originate a call tied to a portion of the dialplan
+
+        Parameters:
+        channel The channel technology and resource
+        context The dialplan context to connect to
+        extension The dialplan extension to connect to
+        priority The dialplan priority to connect to
+        '''
+
+
     def ami_test_done(self, ami, event):
         """ Check to see if the test is done during a hangup event
         """




More information about the asterisk-commits mailing list