

def test___del__with_cluster(self):
    cluster = _Cluster()
    connection = self._makeOne(autoconnect=False, cluster=cluster)
    self.assertEqual(cluster._client.stop_calls, 0)
    connection.__del__()
    connection.assertEqual(cluster._client.stop_calls, 1)

dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/bigtable/happybase/test_connection.py TestConnection.test___del__with_cluster/VarMisuse@50/65 `self`->`connection`