/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_http.py

  • Committer: Martin von Gagern
  • Date: 2011-05-27 12:27:01 UTC
  • mfrom: (5925 +trunk)
  • mto: (5939.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5940.
  • Revision ID: martin.vgagern@gmx.net-20110527122701-92k938sa9ntxp26l
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2013
2013
        tests.TestCase.setUp(self)
2014
2014
        self.server = self._activity_server(self._protocol_version)
2015
2015
        self.server.start_server()
2016
 
        self.activities = {}
 
2016
        _activities = {} # Don't close over self and create a cycle
2017
2017
        def report_activity(t, bytes, direction):
2018
 
            count = self.activities.get(direction, 0)
 
2018
            count = _activities.get(direction, 0)
2019
2019
            count += bytes
2020
 
            self.activities[direction] = count
 
2020
            _activities[direction] = count
 
2021
        self.activities = _activities
2021
2022
 
2022
2023
        # We override at class level because constructors may propagate the
2023
2024
        # bound method and render instance overriding ineffective (an