/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_request.py

  • Committer: Martin Pool
  • Date: 2010-01-25 14:56:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5343.
  • Revision ID: mbp@sourcefrog.net-20100125145624-q6vlk0ga0sivvwlg
Remove tearDown in tests in favor of addCleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
185
185
 
186
186
class TestJailHook(TestCaseWithMemoryTransport):
187
187
 
188
 
    def tearDown(self):
189
 
        request.jail_info.transports = None
190
 
        TestCaseWithMemoryTransport.tearDown(self)
 
188
    def setUp(self):
 
189
        def clear_jail_info():
 
190
            request.jail_info.transports = None
 
191
        self.addCleanup(clear_jail_info)
191
192
 
192
193
    def test_jail_hook(self):
193
194
        request.jail_info.transports = None