Index: mergebot/trunk/utils/test.py
===================================================================
--- mergebot/trunk/test.py	(revision 16)
+++ mergebot/trunk/utils/test.py	(revision 17)
@@ -12,34 +12,34 @@
 
 
-from trac.tests.functional import FunctionalTestSuite, FunctionalTestEnvironment, FunctionalTester, TwillTest, tc, b, logfile
+from trac.tests.functional import FunctionalTestSuite, FunctionalTestEnvironment, FunctionalTester, FunctionalTwillTestCaseSetup, tc, b, logfile
 from trac.tests.contentgen import random_page #, random_sentence, random_word
 
 
-class MergeBotTestEnvironment(FunctionalTestEnvironment):
-    """Slight change to FunctionalTestEnvironment to keep the PYTHONPATH from
-    our environment.
-    """
-    def start(self):
-        """Starts the webserver"""
-        server = Popen(["python", "./trac/web/standalone.py",
-                        "--port=%s" % self.port, "-s",
-                        "--basic-auth=trac,%s," % self.htpasswd,
-                        self.tracdir],
-                       #env={'PYTHONPATH':'.'},
-                       stdout=logfile, stderr=logfile,
-                      )
-        self.pid = server.pid
-        time.sleep(1) # Give the server time to come up
-
-    def _tracadmin(self, *args):
-        """Internal utility method for calling trac-admin"""
-        if call(["python", "./trac/admin/console.py", self.tracdir] +
-                list(args),
-                #env={'PYTHONPATH':'.'},
-                stdout=logfile, stderr=logfile):
-            raise Exception('Failed running trac-admin with %r' % (args, ))
-
-
-FunctionalTestEnvironment = MergeBotTestEnvironment
+#class MergeBotTestEnvironment(FunctionalTestEnvironment):
+#    """Slight change to FunctionalTestEnvironment to keep the PYTHONPATH from
+#    our environment.
+#    """
+#    def start(self):
+#        """Starts the webserver"""
+#        server = Popen(["python", "./trac/web/standalone.py",
+#                        "--port=%s" % self.port, "-s",
+#                        "--basic-auth=trac,%s," % self.htpasswd,
+#                        self.tracdir],
+#                       #env={'PYTHONPATH':'.'},
+#                       stdout=logfile, stderr=logfile,
+#                      )
+#        self.pid = server.pid
+#        time.sleep(1) # Give the server time to come up
+#
+#    def _tracadmin(self, *args):
+#        """Internal utility method for calling trac-admin"""
+#        if call(["python", "./trac/admin/console.py", self.tracdir] +
+#                list(args),
+#                #env={'PYTHONPATH':'.'},
+#                stdout=logfile, stderr=logfile):
+#            raise Exception('Failed running trac-admin with %r' % (args, ))
+#
+#
+#FunctionalTestEnvironment = MergeBotTestEnvironment
 
 
@@ -148,5 +148,5 @@
         port = 8889
         baseurl = "http://localhost:%s" % port
-        self._testenv = FunctionalTestEnvironment("testenv%s" % port, port)
+        self._testenv = FunctionalTestEnvironment("testenv%s" % port, port, baseurl)
 
         # Configure mergebot
@@ -186,5 +186,5 @@
 
 
-class MergeBotTestEnabled(TwillTest):
+class MergeBotTestEnabled(FunctionalTwillTestCaseSetup):
     def runTest(self):
         self._tester.logout()
@@ -197,5 +197,5 @@
 
 
-class MergeBotTestQueueList(TwillTest):
+class MergeBotTestQueueList(FunctionalTwillTestCaseSetup):
     def runTest(self):
         tc.follow('MergeBot')
@@ -204,5 +204,5 @@
 
 
-class MergeBotTestNoVersion(TwillTest):
+class MergeBotTestNoVersion(FunctionalTwillTestCaseSetup):
     """Verify that if a ticket does not have the version field set, it will not
     appear in the MergeBot list.
@@ -215,5 +215,5 @@
 
 
-class MergeBotTestBranch(TwillTest):
+class MergeBotTestBranch(FunctionalTwillTestCaseSetup):
     def runTest(self):
         """Verify that the 'branch' button works"""
@@ -223,5 +223,5 @@
 
 
-class MergeBotTestRebranch(TwillTest):
+class MergeBotTestRebranch(FunctionalTwillTestCaseSetup):
     def runTest(self):
         """Verify that the 'rebranch' button works"""
@@ -232,5 +232,5 @@
 
 
-class MergeBotTestMerge(TwillTest):
+class MergeBotTestMerge(FunctionalTwillTestCaseSetup):
     def runTest(self):
         """Verify that the 'merge' button works"""
@@ -241,5 +241,5 @@
 
 
-class MergeBotTestCheckMerge(TwillTest):
+class MergeBotTestCheckMerge(FunctionalTwillTestCaseSetup):
     def runTest(self):
         """Verify that the 'checkmerge' button works"""
@@ -250,5 +250,5 @@
 
 
-class MergeBotTestSingleUseCase(TwillTest):
+class MergeBotTestSingleUseCase(FunctionalTwillTestCaseSetup):
     def runTest(self):
         """Create a branch, make a change, checkmerge, and merge it."""
