

def test_constructor_with_legacy_args(self):
    from gcloud._testing import _Monkey
    from gcloud.bigtable.happybase import connection as MUT
    warned = []

    def mock_warn(msg):
        warned.append(msg)
    cluster = _Cluster()
    with _Monkey(MUT, _WARN=mock_warn):
        self._makeOne(cluster=cluster, host=object(), port=object(), compat=object(), transport=object(), protocol=object())
    self.assertEqual(len(warned), 1)
    self.assertIn('host', warned[0])
    self.assertIn('port', warned[0])
    self.assertIn('compat', warned[0])
    self.assertIn('transport', warned[0])
    self.assertIn('protocol', warned[0])

dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/bigtable/happybase/test_connection.py TestConnection.test_constructor_with_legacy_args/original