Changeset 40


Ignore:
Timestamp:
Feb 23, 2010 3:39:32 AM (15 years ago)
Author:
retracile
Message:

Mergebot: fixup the test suite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mergebot/trunk/utils/test.py

    r17 r40  
    1212
    1313
    14 from trac.tests.functional import FunctionalTestSuite, FunctionalTestEnvironment, FunctionalTester, FunctionalTwillTestCaseSetup, tc, b, logfile
     14from trac.tests.functional import FunctionalTestSuite, FunctionalTester, FunctionalTwillTestCaseSetup, tc, b, logfile
     15from trac.tests.functional.svntestenv import SvnFunctionalTestEnvironment
    1516from trac.tests.contentgen import random_page #, random_sentence, random_word
    1617
     
    148149        port = 8889
    149150        baseurl = "http://localhost:%s" % port
    150         self._testenv = FunctionalTestEnvironment("testenv%s" % port, port, baseurl)
     151        self._testenv = SvnFunctionalTestEnvironment("testenv%s" % port, port, baseurl)
    151152
    152153        # Configure mergebot
    153154        env = self._testenv.get_trac_environment()
    154155        env.config.set('components', 'mergebot.web_ui.mergebotmodule', 'enabled')
     156        env.config.save()
     157        self._testenv._tracadmin('upgrade') # sets up the bulk of the mergebot config
     158        env.config.parse_if_needed()
    155159        env.config.set('mergebot', 'repository_url', self._testenv.repo_url())
    156         env.config.set('mergebot', 'work_dir', self._testenv.repodir + '/mergebot')
    157 
    158         env.config.set('ticket-custom', 'mergebotstate', 'select')
    159         env.config.set('ticket-custom', 'mergebotstate.editable', '0')
    160         env.config.set('ticket-custom', 'mergebotstate.label', 'MergeBotState')
    161         env.config.set('ticket-custom', 'mergebotstate.options', '| tomerge | merged | tobranch | branched | conflicts')
    162         env.config.set('ticket-custom', 'mergebotstate.order', '2')
    163         env.config.set('ticket-custom', 'mergebotstate.value', '')
    164 
    165160        env.config.set('logging', 'log_type', 'file')
    166 
    167161        env.config.save()
    168162        env.config.parse_if_needed()
    169163
    170164        self._testenv.start()
    171         self._tester = MergeBotFunctionalTester(baseurl, self._testenv.repo_url())
     165        self._tester = MergeBotFunctionalTester(baseurl)
     166        self.fixture = (self._testenv, self._tester)
    172167
    173168        # Setup some common component stuff for MergeBot's use:
Note: See TracChangeset for help on using the changeset viewer.