'Test cluster and session contexts nested in one another.
@since 3.4
@jira_ticket PYTHON-521
@expected_result cluster/session should be crated and shutdown appropriately.
@test_category configuration'

def test_simple_nested(self):

    with Cluster(**self.cluster_kwargs) as cluster:
        with cluster.connect() as session:
            self.assertFalse(cluster.is_shutdown)
            self.assertFalse(session.is_shutdown)
            self.assertTrue(session.execute('select    release_version    from    system.local')[0])
        self.assertTrue(session.is_shutdown)
    self.assertTrue(cluster.is_shutdown)
