Index: mergebot/trunk/utils/test.py
===================================================================
--- mergebot/trunk/utils/test.py	(revision 41)
+++ mergebot/trunk/utils/test.py	(revision 44)
@@ -52,6 +52,7 @@
     # FIXME: the tc.find( <various actions> ) checks are bogus: any ticket can
     # satisfy them, not just the one we're working on.
-    def __init__(self, *args, **kwargs):
-        FunctionalTester.__init__(self, *args, **kwargs)
+    def __init__(self, trac_url, repo_url):
+        FunctionalTester.__init__(self, trac_url)
+        self.repo_url = repo_url
         self.mergeboturl = self.url + '/mergebot'
 
@@ -88,5 +89,5 @@
         tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form
         tc.submit('Branch')
-        self.wait_until_notfind('Doing branch', timeout)
+        self.wait_until_find('Nothing in the queue', timeout)
         tc.find('Rebranch')
         tc.find('Merge')
@@ -99,10 +100,11 @@
             raise Exception('svn ls failed with exit code %s' % retval)
 
-    def rebranch(self, ticket_id, component, timeout=5):
-        """timeout is in seconds."""
-        self.go_to_mergebot()
-        tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form
+    def rebranch(self, ticket_id, component, timeout=15):
+        """timeout is in seconds."""
+        self.go_to_mergebot()
+        tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form
+        print "submitting rebranch request for %s" % (ticket_id)
         tc.submit('Rebranch')
-        self.wait_until_notfind('Doing rebranch', timeout)
+        self.wait_until_find('Nothing in the queue', timeout)
         tc.find('Rebranch')
         tc.find('Merge')
@@ -120,5 +122,5 @@
         tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form
         tc.submit('Merge')
-        self.wait_until_notfind('Doing merge', timeout)
+        self.wait_until_find('Nothing in the queue', timeout)
         tc.find('Branch')
         self.go_to_ticket(ticket_id)
@@ -135,5 +137,5 @@
         tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form
         tc.submit('CheckMerge')
-        self.wait_until_notfind('Doing checkmerge', timeout)
+        self.wait_until_find('Nothing in the queue', timeout)
         tc.find('Rebranch')
         tc.find('Merge')
@@ -158,4 +160,5 @@
         env.config.set('components', 'mergebot.web_ui.mergebotmodule', 'enabled')
         env.config.save()
+        os.mkdir(os.path.join("testenv%s" % port, 'trac', 'mergebot'))
         self._testenv._tracadmin('upgrade') # sets up the bulk of the mergebot config
         env.config.parse_if_needed()
@@ -166,5 +169,5 @@
 
         self._testenv.start()
-        self._tester = MergeBotFunctionalTester(baseurl)
+        self._tester = MergeBotFunctionalTester(baseurl, self._testenv.repo_url())
         self.fixture = (self._testenv, self._tester)
 
@@ -193,11 +196,4 @@
         tc.url(mergeboturl)
         tc.notfind('No handler matched request to /mergebot')
-
-
-class MergeBotTestQueueList(FunctionalTwillTestCaseSetup):
-    def runTest(self):
-        tc.follow('MergeBot')
-        for queue in 'branch', 'rebranch', 'checkmerge', 'merge':
-            tc.find('%s Queue' % queue)
 
 
@@ -281,11 +277,10 @@
     suite = MergeBotTestSuite()
     suite.addTest(MergeBotTestEnabled())
-    suite.addTest(MergeBotTestQueueList())
     suite.addTest(MergeBotTestNoVersion())
     suite.addTest(MergeBotTestBranch())
-    suite.addTest(MergeBotTestRebranch())
-    suite.addTest(MergeBotTestMerge())
+    #suite.addTest(MergeBotTestRebranch())
     suite.addTest(MergeBotTestCheckMerge())
     suite.addTest(MergeBotTestSingleUseCase())
+    suite.addTest(MergeBotTestMerge())
     return suite
 
