~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_send.py

  • Committer: Vincent Ladeuil
  • Date: 2009-06-29 09:50:35 UTC
  • mto: (4498.2.2 integration)
  • mto: This revision was merged to the branch mainline in revision 4501.
  • Revision ID: v.ladeuil+lp@free.fr-20090629095035-oeejy5pfebrpby66
Use mixins as suggested by Martin on IRC.

* bzrlib/tests/blackbox/test_send.py:
Using mixins is indeed clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    return result
51
51
 
52
52
 
53
 
class TestSendBase(tests.TestCaseWithTransport):
 
53
class TestSendMixin(object):
54
54
 
55
55
    _default_command = ['send', '-o-']
56
56
    _default_wd = 'branch'
73
73
        self.assertEqual(set(revs), set(r.revision_id for r in br.revisions))
74
74
 
75
75
 
76
 
class TestSend(TestSendBase):
 
76
class TestSend(tests.TestCaseWithTransport, TestSendMixin):
77
77
 
78
78
    def setUp(self):
79
79
        super(TestSend, self).setUp()
287
287
        self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)
288
288
 
289
289
 
290
 
class TestSendStrict(TestSendBase):
 
290
class TestSendStrictMixin(TestSendMixin):
291
291
 
292
292
    _default_command = ['send', '-o-', '../parent']
293
293
    _default_wd = 'local'
325
325
        self.assertEqual(set(revs), set(r.revision_id for r in br.revisions))
326
326
 
327
327
 
328
 
class TestSendStrictWithoutChanges(TestSendStrict):
 
328
class TestSendStrictWithoutChanges(tests.TestCaseWithTransport,
 
329
                                   TestSendStrictMixin):
329
330
 
330
331
    def setUp(self):
331
332
        super(TestSendStrictWithoutChanges, self).setUp()
349
350
        self.assertSendSucceeds(['local'], [])
350
351
 
351
352
 
352
 
class TestSendStrictWithChanges(TestSendStrict):
 
353
class TestSendStrictWithChanges(tests.TestCaseWithTransport,
 
354
                                   TestSendStrictMixin):
353
355
 
354
356
    _changes_type = None # Set by load_tests
355
357