[svn-commits] pabelanger: branch pabelanger/testClass r1227 - /asterisk/team/pabelanger/tes...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 16 20:30:14 UTC 2010


Author: pabelanger
Date: Thu Dec 16 14:30:11 2010
New Revision: 1227

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1227
Log:
Update test with to check for AMI instance ID.

Modified:
    asterisk/team/pabelanger/testClass/tests/udptl/run-test

Modified: asterisk/team/pabelanger/testClass/tests/udptl/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/udptl/run-test?view=diff&rev=1227&r1=1226&r2=1227
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/udptl/run-test (original)
+++ asterisk/team/pabelanger/testClass/tests/udptl/run-test Thu Dec 16 14:30:11 2010
@@ -22,11 +22,14 @@
         TestCase.__init__(self, argv)
         self.create_asterisk(2)
 
-    def ami_connect1(self, ami):
-        print "AMI Connect 1"
-        ami.originate(channel = "SIP/666 at receiver",
-                            application = "SendFax",
-                            data = "tests/udptl/1page.tif")
+    def ami_connect(self, ami):
+        TestCase.ami_connect(self, ami)
+        if ami.id == 0:
+            self.ami[0].originate(channel = "SIP/666 at receiver",
+                    application = "SendFax",
+                    data = "tests/udptl/1page.tif")
+        elif ami.id == 1:
+            self.ami[1].registerEvent("UserEvent", self.check_recv_fax_result)
 
     def check_recv_fax_result(self, ami, event):
         if event.get("userevent").lower() != "recvstatus":
@@ -41,11 +44,6 @@
         else:
             self.passed = False
             print "UDPTL test failed!"
-
-    def ami_connect2(self, ami):
-        print "AMI Connect 2"
-        self.ami2 = ami
-        self.ami2.registerEvent("UserEvent", self.check_recv_fax_result)
 
     def ami_login(self):
         self.create_ami_factory(2, "user", "mysecret")




More information about the svn-commits mailing list