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

  • Committer: Andrew Bennetts
  • Date: 2008-05-07 22:47:56 UTC
  • mfrom: (3412 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3414.
  • Revision ID: andrew.bennetts@canonical.com-20080507224756-upxgmud0bdo4ysuf
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1130
1130
    def test_server_started_hook_memory(self):
1131
1131
        """The server_started hook fires when the server is started."""
1132
1132
        self.hook_calls = []
1133
 
        server.SmartTCPServer.hooks.install_hook('server_started',
1134
 
            self.capture_server_call)
 
1133
        server.SmartTCPServer.hooks.install_named_hook('server_started',
 
1134
            self.capture_server_call, None)
1135
1135
        self.setUpServer()
1136
1136
        # at this point, the server will be starting a thread up.
1137
1137
        # there is no indicator at the moment, so bodge it by doing a request.
1144
1144
    def test_server_started_hook_file(self):
1145
1145
        """The server_started hook fires when the server is started."""
1146
1146
        self.hook_calls = []
1147
 
        server.SmartTCPServer.hooks.install_hook('server_started',
1148
 
            self.capture_server_call)
 
1147
        server.SmartTCPServer.hooks.install_named_hook('server_started',
 
1148
            self.capture_server_call, None)
1149
1149
        self.setUpServer(backing_transport=get_transport("."))
1150
1150
        # at this point, the server will be starting a thread up.
1151
1151
        # there is no indicator at the moment, so bodge it by doing a request.
1160
1160
    def test_server_stopped_hook_simple_memory(self):
1161
1161
        """The server_stopped hook fires when the server is stopped."""
1162
1162
        self.hook_calls = []
1163
 
        server.SmartTCPServer.hooks.install_hook('server_stopped',
1164
 
            self.capture_server_call)
 
1163
        server.SmartTCPServer.hooks.install_named_hook('server_stopped',
 
1164
            self.capture_server_call, None)
1165
1165
        self.setUpServer()
1166
1166
        result = [([self.backing_transport.base], self.transport.base)]
1167
1167
        # check the stopping message isn't emitted up front.
1177
1177
    def test_server_stopped_hook_simple_file(self):
1178
1178
        """The server_stopped hook fires when the server is stopped."""
1179
1179
        self.hook_calls = []
1180
 
        server.SmartTCPServer.hooks.install_hook('server_stopped',
1181
 
            self.capture_server_call)
 
1180
        server.SmartTCPServer.hooks.install_named_hook('server_stopped',
 
1181
            self.capture_server_call, None)
1182
1182
        self.setUpServer(backing_transport=get_transport("."))
1183
1183
        result = [(
1184
1184
            [self.backing_transport.base, self.backing_transport.external_url()]