﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33685	Support using service names for tests on PostgreSQL.	Shane Ambler	Pravin	"In django 4.0 the postgresql DATABASE settings were changed to allow use of a .pg_service.conf and .pgpass file being defined in the OPTIONS value.

Using the **old** config **works** fine in both runserver and test.

Using the **new** config works for runserver but **fails** for test.

In settings I have :-

{{{#!python
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'OPTIONS': {
            'service': 'yfsm_pgdb',
            'passfile': '.yfsm_pgpass',
        },
    },
}
}}}

I have the user password entry allowing login to any database (using `*`) I have also tried adding an entry with `test_dbname`. I also tried adding an entry in .pg_service.conf as `[test_yfsm_pgdb]`

running tests I see `django.db.utils.OperationalError: fe_sendauth: no password supplied` indicating that the password file is not used.

It would appear that when testing, the new OPTIONS settings are ignored.
"	New feature	assigned	Testing framework	4.0	Normal			Hasan Ramezani Carlton Gibson	Accepted	1	0	0	0	0	0
