'Test to to ensure functions come after UDTs in in keyspace dump
test_functions_after_udt creates a basic function. Then queries that function and  make sure that in the results
that UDT\'s are listed before any corresponding functions, when we dump the keyspace
Ideally we would make a function that takes a udt type, but this presently fails because C* c059a56 requires
udt to be frozen to create, but does not store meta indicating frozen
SEE https://issues.apache.org/jira/browse/CASSANDRA-9186
Maybe update this after release
kwargs = self.make_function_kwargs()
kwargs[\'argument_types\'][0] = "frozen<%s>" % udt_name
expected_meta = Function(**kwargs)
with self.VerifiedFunction(self, **kwargs):
@since 2.6.0
@jira_ticket PYTHON-211
@expected_result UDT\'s should come before any functions
@test_category function'

def test_functions_after_udt(self):

    self.assertNotIn(self.function_name, self.keyspace_function_meta)
    udt_name = 'udtx'
    self.session.execute(('CREATE    TYPE    %s    (x    int)' % udt_name))
    with self.VerifiedFunction(self, **self.make_function_kwargs()):
        keyspace_cql = self.cluster.metadata.keyspaces[self.keyspace_name].export_as_string()
        type_idx = keyspace_cql.rfind('CREATE    TYPE')
        func_idx = keyspace_cql.find('CREATE    FUNCTION')
        self.assertNotIn((-1), (type_idx, func_idx), ('TYPE    or    FUNCTION    not    found    in    keyspace_cql:    ' + keyspace_cql))
        self.assertGreater(func_idx, type_idx)
