~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_test_server.py

  • Committer: Patch Queue Manager
  • Date: 2015-12-17 18:39:00 UTC
  • mfrom: (6606.1.2 fix-float)
  • Revision ID: pqm@pqm.ubuntu.com-20151217183900-0719du2uv1kwu3lc
(vila) Inline testtools private method to fix an issue in xenial (the
 private implementation has changed in an backward incompatible way).
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2010, 2011, 2016 Canonical Ltd
 
1
# Copyright (C) 2010, 2011 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
133
133
 
134
134
    def assertClientAddr(self, client, server, conn_rank):
135
135
        conn = self.get_server_connection(server, conn_rank)
136
 
        self.assertEqual(client.sock.getsockname(), conn[1])
 
136
        self.assertEquals(client.sock.getsockname(), conn[1])
137
137
 
138
138
    def test_start_stop(self):
139
139
        server = self.get_server()
152
152
        self.assertIs(None, client.write('ping\n'))
153
153
        resp = client.read()
154
154
        self.assertClientAddr(client, server, 0)
155
 
        self.assertEqual('pong\n', resp)
 
155
        self.assertEquals('pong\n', resp)
156
156
 
157
157
    def test_server_fails_to_start(self):
158
158
        class CantStart(Exception):
266
266
 
267
267
        server = self.get_server(
268
268
            connection_handler_class=FailingWhileServingConnectionHandler)
269
 
        self.assertEqual(True, server.server.serving)
 
269
        self.assertEquals(True, server.server.serving)
270
270
        # Install the exception swallower
271
271
        server.set_ignored_exceptions(CantServe)
272
272
        client = self.get_client()