'Test to verify to that that called on null argument is honored on function creation.
test_functions_follow_keyspace_alter create two functions. One with the called_on_null_input set to true,
the other with it set to false. We then verify that the metadata constructed from those function is correctly
reflected
@since 2.6.0
@jira_ticket PYTHON-211
@expected_result functions metadata correctly reflects called_on_null_input flag.
@test_category function'

def test_function_cql_called_on_null(self):

    kwargs = self.make_function_kwargs()
    kwargs['called_on_null_input'] = True
    with self.VerifiedFunction(self, **kwargs) as vf:
        fn_meta = self.keyspace_function_meta[vf.signature]
        self.assertRegexpMatches(fn_meta.as_cql_query(), 'CREATE    FUNCTION.*\\)    CALLED    ON    NULL    INPUT    RETURNS    .*')
    kwargs['called_on_null_input'] = False
    with self.VerifiedFunction(self, **kwargs) as vf:
        fn_meta = self.keyspace_function_meta[vf.signature]
        self.assertRegexpMatches(fn_meta.as_cql_query(), 'CREATE    FUNCTION.*\\)    RETURNS    NULL    ON    NULL    INPUT    RETURNS    .*')
