diff --git a/swh/vault/tests/conftest.py b/swh/vault/tests/conftest.py --- a/swh/vault/tests/conftest.py +++ b/swh/vault/tests/conftest.py @@ -11,7 +11,7 @@ import pytest from pytest_postgresql import factories -from swh.core.db.pytest_plugin import initialize_database_for_module, postgresql_fact +from swh.core.db.pytest_plugin import initialize_database_for_module from swh.vault import get_vault from swh.vault.backend import VaultBackend @@ -35,13 +35,12 @@ vault_postgresql_proc = factories.postgresql_proc( - dbname="vault", load=[ partial(initialize_database_for_module, "vault", VaultBackend.current_version) ], ) -postgres_vault = postgresql_fact("vault_postgresql_proc") +postgres_vault = factories.postgresql("vault_postgresql_proc") @pytest.fixture diff --git a/swh/vault/tests/test_git_bare_cooker.py b/swh/vault/tests/test_git_bare_cooker.py --- a/swh/vault/tests/test_git_bare_cooker.py +++ b/swh/vault/tests/test_git_bare_cooker.py @@ -24,7 +24,7 @@ from pytest import param from pytest_postgresql import factories -from swh.core.db.pytest_plugin import initialize_database_for_module, postgresql_fact +from swh.core.db.pytest_plugin import initialize_database_for_module from swh.model.from_disk import DentryPerms from swh.model.model import ( Content, @@ -47,7 +47,6 @@ from swh.vault.in_memory_backend import InMemoryVaultBackend storage_postgresql_proc = factories.postgresql_proc( - dbname="storage", load=[ partial( initialize_database_for_module, "storage", StorageBackend.current_version @@ -55,7 +54,7 @@ ], ) -storage_postgresql = postgresql_fact("storage_postgresql_proc", no_db_drop=True) +storage_postgresql = factories.postgresql("storage_postgresql_proc") @pytest.fixture