'Test to verify to that functions maintain equality after a keyspace is altered
test_functions_follow_keyspace_alter creates a function then alters a the keyspace associated with that function.
After the alter we validate that the function maintains the same metadata
@since 2.6.0
@jira_ticket PYTHON-211
@expected_result functions are the same after parent keyspace is altered
@test_category function'

def test_functions_follow_keyspace_alter(self):

    with self.VerifiedFunction(self, **self.make_function_kwargs()):
        original_keyspace_meta = self.cluster.metadata.keyspaces[self.keyspace_name]
        self.session.execute(('ALTER    KEYSPACE    %s    WITH    durable_writes    =    false' % self.keyspace_name))
        try:
            new_keyspace_meta = self.cluster.metadata.keyspaces[self.keyspace_name]
            self.assertNotEqual(original_keyspace_meta, new_keyspace_meta)
            self.assertIs(original_keyspace_meta.functions, new_keyspace_meta.functions)
        finally:
            self.session.execute(('ALTER    KEYSPACE    %s    WITH    durable_writes    =    true' % self.keyspace_name))
