Page MenuHomeSoftware Heritage
Paste P1184

(An Untitled Masterwork)
ActivePublic

Authored by douardda on Sep 29 2021, 4:19 PM.
# in swh/web/tests/conftest/py
@pytest.fixture(scope='session')
def django_db_modify_db_settings(django_db_modify_db_settings_parallel_suffix, postgresql_proc):
from django.conf import settings as django_settings
django_settings.DATABASES['default'].update({
'ENGINE': 'django.db.backends.postgresql',
'HOST': postgresql_proc.host,
'PORT': postgresql_proc.port,
'USER': postgresql_proc.user,
'NAME': postgresql_proc.dbname,
})