~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-26 10:49:57 UTC
  • mfrom: (4987.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100126104957-dmtqnc0pckuruyla
(vila,
        jam) Implement TestCase.overrideAttr to simplify tests setUp/cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
2008
2008
        self.assertLength(1, self.hpss_calls)
2009
2009
 
2010
2010
    def disableExtraResults(self):
2011
 
        old_flag = SmartServerRepositoryGetParentMap.no_extra_results
2012
 
        SmartServerRepositoryGetParentMap.no_extra_results = True
2013
 
        def reset_values():
2014
 
            SmartServerRepositoryGetParentMap.no_extra_results = old_flag
2015
 
        self.addCleanup(reset_values)
 
2011
        self.overrideAttr(SmartServerRepositoryGetParentMap,
 
2012
                          'no_extra_results', True)
2016
2013
 
2017
2014
    def test_null_cached_missing_and_stop_key(self):
2018
2015
        self.setup_smart_server_with_call_log()