def test_log_message(self):
        # Should be possible to customize the message which is logged.
        TEST_STRING = "test-1234"
        factory = WhitelistingFactory(
            TestFactory(), [ip_network('127.0.0.1/32')], TEST_STRING
        )
        self.assertEqual(
            factory.buildProtocol(IPv4Address('TCP', '127.0.0.2', 0)),
            None
        )
        self.assertFalse("connection" in self.observer.messages[0][0])
        self.assertTrue(TEST_STRING in self.observer.messages[0][0])
dataset/ETHPy150Open jdswinbank/Comet/comet/utility/test/test_whitelist.py/WhitelistingFactoryTestCase.test_log_message/original