[asterisk-commits] pabelanger: branch pabelanger/testClass r1110 - in /asterisk/team/pabelanger/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 8 14:52:30 CST 2010


Author: pabelanger
Date: Wed Dec  8 14:52:26 2010
New Revision: 1110

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1110
Log:
Remove unsed logic.
Allow tests to access asterisk_class

Modified:
    asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py
    asterisk/team/pabelanger/testClass/tests/manager/login/run-test

Modified: asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py?view=diff&rev=1110&r1=1109&r2=1110
==============================================================================
--- asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py (original)
+++ asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py Wed Dec  8 14:52:26 2010
@@ -13,7 +13,7 @@
 from asterisk import Asterisk
 
 class TestCase(object):
-    __asterisk_class = []
+    asterisk_class = []
 
     def __init__(self, argv):
         # get version info
@@ -29,21 +29,21 @@
     def create_asterisk(self, count=1):
         for c in range(count):
             print "Creating Asterisk instance %d..." % (c + 1)
-            self.__asterisk_class.append(Asterisk(base=self.options.base))
+            self.asterisk_class.append(Asterisk(base=self.options.base))
             # Copy shared config files
-            self.__asterisk_class[c].install_configs("%s/configs" %
+            self.asterisk_class[c].install_configs("%s/configs" %
                     (self.options.test_name))
             # Copy test specific config files
-            self.__asterisk_class[c].install_configs("%s/configs/ast%d" %
+            self.asterisk_class[c].install_configs("%s/configs/ast%d" %
                     (self.options.test_name, c + 1))
 
     def start_asterisk(self):
-        for index, item in enumerate(self.__asterisk_class):
+        for index, item in enumerate(self.asterisk_class):
             print "Starting Asterisk instance %d..." % (index + 1)
-            self.__asterisk_class[index].start()
+            self.asterisk_class[index].start()
 
     def stop_asterisk(self):
-        for index, item in enumerate(self.__asterisk_class):
+        for index, item in enumerate(self.asterisk_class):
             print "Stopping Asterisk instance %d..." % (index + 1)
-            self.__asterisk_class[index].stop()
+            self.asterisk_class[index].stop()
 

Modified: asterisk/team/pabelanger/testClass/tests/manager/login/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/manager/login/run-test?view=diff&rev=1110&r1=1109&r2=1110
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/manager/login/run-test (original)
+++ asterisk/team/pabelanger/testClass/tests/manager/login/run-test Wed Dec  8 14:52:26 2010
@@ -19,21 +19,16 @@
 from asterisk.asterisk import Asterisk
 from asterisk.TestCase import TestCase
 
-workingdir = "/tmp/asterisk-testsuite/manager/login"
-testdir = "tests/manager/login"
-
 class AMILoginTest(TestCase):
     def __init__(self, argv):
-        TestCase.__init__(self, argv)
-        self.base_dir = workingdir
-        self.test_dir = testdir
         self.passed = False
         self.last_step = ""
         self.ami = None
 
+        TestCase.__init__(self, argv)
+        self.create_asterisk()
+
         reactor.callWhenRunning(self.run)
-
-        self.create_asterisk()
 
     def stop_reactor(self):
         print "Stopping Reactor ..."




More information about the asterisk-commits mailing list