def METHOD_NAME(self):
    tmp_file = NamedTemporaryFile(suffix='.sql', prefix='test_', mode='w+',
                                  dir=os.path.join(settings.VAR_DIR, 'conf', 'extra_sql', 'common'))
    tmp_file.write("""
    CREATE FUNCTION {{ schema_geotrek }}.test() RETURNS char SECURITY DEFINER AS $$
    BEGIN
        RETURN 'test';
    END;
    $$ LANGUAGE plpgsql;
    """)
    tmp_file.flush()
    common = apps.get_app_config('common')
    load_sql_files(common, 'test')
    tmp_file.close()
    cursor = connection.cursor()
    cursor.execute("""
    SELECT public.test();
    """)
    result = cursor.fetchall()
    tmp_file.close()
    self.assertEqual(result[0][0], 'test')