Opened 12 years ago
Closed 12 years ago
#21234 closed Uncategorized (duplicate)
DATABASES['other']['TEST_NAME'] is ignored is some situations.
| Reported by: | Vernon Cole | Owned by: | nobody |
|---|---|---|---|
| Component: | Uncategorized | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Attempting to test django using the following settings fails with an infinite wait. It appears that 'TEST_NAME' is ignored, causing conflicting use of the (single) database.
I have determined that if DATABASES['default']['NAME'] != DATABASES['other']['NAME'] then 'TEST_NAME' works correctly.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'adotest',
'USER': 'adotestuser',
'PASSWORD': '12345678',
'HOST': 'localhost',
'OPTIONS': {
'autocommit': True,
},
},
'other': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'adotest',
'TEST_NAME': 'other_test',
'USER': 'adotestuser',
'PASSWORD': '12345678',
'HOST': 'localhost',
'OPTIONS': {
'autocommit': True,
},
}
}
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 12 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
It seems likely you are running into #16969 which suggests to avoid selecting the production database prior to test database setup/teardown.
Note:
See TracTickets
for help on using tickets.
Why would you have
DATABASES['default']['NAME'] == DATABASES['other']['NAME']? This seems illogical to me.