def req(): obj = Object() obj.cfg = Object(redirects_timestamp='/dev/null') obj.db = Sql('sqlite:memory:') obj.log_info = error obj.log_error = error with obj.db.transaction(error) as c: sql_script(c, sql_path, 'redirects.sql') return obj
def req(): obj = Object() obj.db = Sql('sqlite:memory:') obj.log_info = error with obj.db.transaction(error) as c: sql_script(c, 'login.sql') sql_script(c, 'logins.01.sql') sql_script(c, 'logins.02.sql') sql_script(c, 'new.sql') sql_script(c, 'news.01.sql') return obj
def req(): obj = Object() obj.db = Sql('sqlite:memory:') obj.log_info = error obj.log_error = error with obj.db.transaction(error) as c: sql_script(c, sql_path, 'login.sql') sql_script(c, sql_path, 'logins.01.sql') sql_script(c, sql_path, 'logins.02.sql') sql_script(c, sql_path, 'tags.sql') sql_script(c, sql_path, 'articles.sql') sql_script(c, sql_path, 'articles_discussion.sql') return obj