Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/tests/conftest.py
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | ) -> Dict[str, str]: | ||||
init_admin_extensions("swh.provenance", postgresql.dsn) | init_admin_extensions("swh.provenance", postgresql.dsn) | ||||
populate_database_for_package( | populate_database_for_package( | ||||
"swh.provenance", postgresql.dsn, flavor=request.param | "swh.provenance", postgresql.dsn, flavor=request.param | ||||
) | ) | ||||
return postgresql.get_dsn_parameters() | return postgresql.get_dsn_parameters() | ||||
@pytest.fixture(params=["mongodb", "postgresql", "rabbitmq"]) | @pytest.fixture(params=["mongodb", "postgresql"]) | ||||
def provenance_storage( | def provenance_storage( | ||||
request: SubRequest, | request: SubRequest, | ||||
provenance_postgresqldb: Dict[str, str], | provenance_postgresqldb: Dict[str, str], | ||||
mongodb: mongomock.database.Database, | mongodb: mongomock.database.Database, | ||||
) -> Generator[ProvenanceStorageInterface, None, None]: | ) -> Generator[ProvenanceStorageInterface, None, None]: | ||||
"""Return a working and initialized ProvenanceStorageInterface object""" | """Return a working and initialized ProvenanceStorageInterface object""" | ||||
if request.param == "mongodb": | if request.param == "mongodb": | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |