

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

    def mock_warn(msg):
        warned.append(msg)
    option = {
        'badkey': None,
    }
    with _Monkey(MUT, _WARN=mock_warn):
        result = self._callFUT(option)
    self.assertEqual(result, None)
    self.assertEqual(len(warned), 1)
    self.assertIn('badkey', warned[0])

dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/bigtable/happybase/test_connection.py Test__parse_family_option.test_dictionary_bad_key/original