Rev 6258: Call the proper base class setUp() and set the inheritance order correctly now that get_transport exists in the base class. in file:///home/vila/src/bzr/reviews/urllib-verifies-ssl-certs/

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Jan 19 16:36:08 UTC 2012


At file:///home/vila/src/bzr/reviews/urllib-verifies-ssl-certs/

------------------------------------------------------------
revno: 6258
revision-id: v.ladeuil+lp at free.fr-20120119163608-77v8z7firiewep4o
parent: v.ladeuil+lp at free.fr-20120119152747-qlvskfb606tw5dge
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: urllib-verifies-ssl-certs
timestamp: Thu 2012-01-19 17:36:08 +0100
message:
  Call the proper base class setUp() and set the inheritance order correctly now that get_transport exists in the base class.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py	2012-01-19 15:27:32 +0000
+++ b/bzrlib/tests/test_http.py	2012-01-19 16:36:08 +0000
@@ -2117,9 +2117,10 @@
     """
 
     def setUp(self):
-        tests.TestCase.setUp(self)
+        tests.TestCaseInTempDir.setUp(self)
         self.server = self._activity_server(self._protocol_version)
         self.server.start_server()
+        self.addCleanup(self.server.stop_server)
         _activities = {} # Don't close over self and create a cycle
         def report_activity(t, bytes, direction):
             count = _activities.get(direction, 0)
@@ -2136,7 +2137,6 @@
         # bound method and render instance overriding ineffective (an
         # alternative would be to define a specific ui factory instead...)
         self.overrideAttr(self._transport, '_report_activity', report_activity)
-        self.addCleanup(self.server.stop_server)
 
     def get_transport(self):
         t = self._transport(self.server.get_url())
@@ -2258,7 +2258,7 @@
         self.assertActivitiesMatch()
 
 
-class TestActivity(tests.TestCaseInTempDir, TestActivityMixin):
+class TestActivity(TestActivityMixin, tests.TestCaseInTempDir):
 
     scenarios = multiply_scenarios(
         vary_by_http_activity(),
@@ -2269,7 +2269,7 @@
         TestActivityMixin.setUp(self)
 
 
-class TestNoReportActivity(tests.TestCaseInTempDir, TestActivityMixin):
+class TestNoReportActivity(TestActivityMixin, tests.TestCaseInTempDir):
 
     # Unlike TestActivity, we are really testing ReportingFileSocket and
     # ReportingSocket, so we don't need all the parametrization. Since



More information about the bazaar-commits mailing list