Commits

Olemis Lang  committed 6da485b

BH Multiproduct #695 : Minor code changes to run the test suite ... (errors=2)

  • Participants
  • Parent commits 191c0d2
  • Branches t695_commit_ticket_update

Comments (0)

Files changed (1)

File t695/t695_r1534486_commit_ticket_update.tests.func.diff

 
 diff -r b34a5a7d744e bloodhound_multiproduct/tests/functional/versioncontrol.py
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bloodhound_multiproduct/tests/functional/versioncontrol.py	Sun Dec 08 16:04:27 2013 -0500
-@@ -0,0 +1,194 @@
++++ b/bloodhound_multiproduct/tests/functional/versioncontrol.py	Sun Dec 08 16:33:07 2013 -0500
+@@ -0,0 +1,196 @@
 +# -*- coding: utf-8 -*-
 +#!/usr/bin/python
 +#
 +"""Functional tests for Apache(TM) Bloodhound's repository operations"""
 +
 +from trac.tests.contentgen import random_page, random_sentence, random_word
-+from trac.tests.functional import FunctionalTwillTestCaseSetup
++from trac.tests.functional import FunctionalTwillTestCaseSetup, has_svn
 +from trac.tests.functional.tester import tc
 +
 +from tests import unittest
++from tests.functional import GLOBAL_ENV
 +
 +class CommitTicketUpdaterTestCase(FunctionalTwillTestCaseSetup):
 +
 +    def setUp(self):
 +        if not has_svn:
 +            errmsg = 'Unable to load svn support'
-+            if hasattr(self, 'skipTest')
++            if hasattr(self, 'skipTest'):
 +                self.skipTest(errmsg)
 +            else:
 +                raise RuntimeError(errmsg)
 +        from tests import functional
 +        suite = functional.functionalSuite()
 +
-+    suite.addTest(CommitTicketUpdaterTestCase())
++    for tc in unittest.makeSuite(CommitTicketUpdaterTestCase):
++        suite.addTest(tc)
 +
 +    return suite
 +
 +
 +if __name__ == '__main__':
-+    unittest.main(defaultTest='test_suite')
++    __import__('unittest').main(defaultTest='functionalSuite')
 +
 diff -r b34a5a7d744e trac/trac/tests/functional/svntestenv.py
 --- a/trac/trac/tests/functional/svntestenv.py	Sun Dec 08 12:15:04 2013 -0500
-+++ b/trac/trac/tests/functional/svntestenv.py	Sun Dec 08 16:04:27 2013 -0500
++++ b/trac/trac/tests/functional/svntestenv.py	Sun Dec 08 16:33:07 2013 -0500
 @@ -52,7 +52,7 @@
                  + [self.repo_url() + '/' + d for d in paths])
          self.call_in_workdir(['svn', 'update'])