Rev 4728: Final tweak. in file:///home/vila/src/bzr/bugs/438158-dpush-strict/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Oct 2 15:35:30 BST 2009


At file:///home/vila/src/bzr/bugs/438158-dpush-strict/

------------------------------------------------------------
revno: 4728
revision-id: v.ladeuil+lp at free.fr-20091002143530-v47dydvknxbkcfw8
parent: v.ladeuil+lp at free.fr-20091002113502-fc0s0jw1mly4dofe
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 438158-dpush-strict
timestamp: Fri 2009-10-02 16:35:30 +0200
message:
  Final tweak.
  
  * bzrlib/tests/blackbox/test_dpush.py:
  (TestDpushStrictMixin.setUp): This is really the mixin setup.
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_dpush.py'
--- a/bzrlib/tests/blackbox/test_dpush.py	2009-10-02 11:35:02 +0000
+++ b/bzrlib/tests/blackbox/test_dpush.py	2009-10-02 14:35:30 +0000
@@ -140,10 +140,11 @@
 
 class TestDpushStrictMixin(object):
 
-    def make_foreign_branch(self, relpath='to'):
+    def setUp(self):
+        test_foreign.register_dummy_foreign_for_test(self)
         # Create an empty branch where we will be able to push
         self.foreign = self.make_branch(
-            relpath, format=test_foreign.DummyForeignVcsDirFormat())
+            'to', format=test_foreign.DummyForeignVcsDirFormat())
 
     def set_config_push_strict(self, value):
         # set config var (any of bazaar.conf, locations.conf, branch.conf
@@ -172,9 +173,8 @@
                                     test_push.TestPushStrictWithoutChanges):
 
     def setUp(self):
-        super(TestDpushStrictWithoutChanges, self).setUp()
-        test_foreign.register_dummy_foreign_for_test(self)
-        self.make_foreign_branch()
+        test_push.TestPushStrictWithoutChanges.setUp(self)
+        TestDpushStrictMixin.setUp(self)
 
 
 class TestDpushStrictWithChanges(TestDpushStrictMixin,
@@ -183,9 +183,8 @@
     _changes_type = None # Set by load_tests
 
     def setUp(self):
-        super(TestDpushStrictWithChanges, self).setUp()
-        test_foreign.register_dummy_foreign_for_test(self)
-        self.make_foreign_branch()
+        test_push.TestPushStrictWithChanges.setUp(self)
+        TestDpushStrictMixin.setUp(self)
 
     def test_push_with_revision(self):
         raise tests.TestNotApplicable('dpush does not handle --revision')



More information about the bazaar-commits mailing list