Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/debian/tests/conftest.py
# Copyright (C) 2019-2020 The Software Heritage developers | # Copyright (C) 2019-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import os | import os | ||||
import pytest | import pytest | ||||
from sqlalchemy.orm import sessionmaker | from sqlalchemy.orm import sessionmaker | ||||
from swh.core.db.pytest_plugin import postgresql_fact | from swh.core.db.pytest_plugin import postgresql_fact | ||||
from swh.lister.debian import debian_init | from swh.lister.debian import debian_init | ||||
import swh.scheduler | import swh.scheduler | ||||
SQL_DIR = os.path.join(os.path.dirname(swh.scheduler.__file__), "sql") | SQL_DIR = os.path.join(os.path.dirname(swh.scheduler.__file__), "sql") | ||||
postgresql_scheduler = postgresql_fact( | postgresql_scheduler = postgresql_fact( | ||||
"postgresql_proc", | "postgresql_proc", | ||||
db_name="scheduler-lister", | db_name="scheduler-lister", | ||||
dump_files=os.path.join(SQL_DIR, "*.sql"), | dump_files=os.path.join(SQL_DIR, "*.sql"), | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |