~facundo/ubuntuone-client/stable-1-6--more-simult-transfers

« back to all changes in this revision

Viewing changes to tests/syncdaemon/test_action_queue.py

  • Committer: Tarmac
  • Author(s): Facundo Batista
  • Date: 2011-04-08 20:55:20 UTC
  • mfrom: (947.2.1 aq-log-hostport-ok)
  • Revision ID: tarmac-20110408205520-a415l523awpjvf58
Log the real host:port to which just connected (LP: #693456).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1237
1237
 
1238
1238
        yield self._disconnect_factory()
1239
1239
 
 
1240
    def test_connection_started_logging(self):
 
1241
        """Test that the connection started logs connector info, not AQ's."""
 
1242
        assert self.action_queue.host == '127.0.0.1'
 
1243
        assert self.action_queue.port == 0
 
1244
 
 
1245
        class FakeConnector(object):
 
1246
            """Fake connector."""
 
1247
            host = '1.2.3.4'
 
1248
            port = 4321
 
1249
 
 
1250
        self.action_queue.startedConnecting(FakeConnector())
 
1251
        self.assertTrue(self.handler.check_info("Connection started",
 
1252
                                                "host 1.2.3.4", "port 4321"))
 
1253
 
1240
1254
 
1241
1255
class NetworkmanagerTestCase(FactoryBaseTestCase):
1242
1256
    """Base test case generating a connected factory."""