mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[boulder-oracle-sprint] fix user and password for reconnection to test database
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a12bdeb445
commit
125cd04d2b
@ -28,6 +28,7 @@ DATA_TYPES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_DATABASE_PREFIX = 'test_'
|
TEST_DATABASE_PREFIX = 'test_'
|
||||||
|
PASSWORD = 'Im_a_lumberjack'
|
||||||
|
|
||||||
def create_test_db(settings, connection, backend, verbosity=1, autoclobber=False):
|
def create_test_db(settings, connection, backend, verbosity=1, autoclobber=False):
|
||||||
if verbosity >= 1:
|
if verbosity >= 1:
|
||||||
@ -58,7 +59,8 @@ def create_test_db(settings, connection, backend, verbosity=1, autoclobber=False
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
connection.close()
|
connection.close()
|
||||||
settings.DATABASE_NAME = TEST_DATABASE_NAME
|
settings.DATABASE_USER = TEST_DATABASE_NAME
|
||||||
|
settings.DATABASE_PASSWORD = PASSWORD
|
||||||
|
|
||||||
# Get a cursor (even though we don't need one yet). This has
|
# Get a cursor (even though we don't need one yet). This has
|
||||||
# the side effect of initializing the test database.
|
# the side effect of initializing the test database.
|
||||||
@ -110,7 +112,7 @@ def _destroy_test_db(cursor, dbname, verbosity):
|
|||||||
def _execute_statements(cursor, statements, dbname, verbosity):
|
def _execute_statements(cursor, statements, dbname, verbosity):
|
||||||
for template in statements:
|
for template in statements:
|
||||||
stmt = template % {'user': dbname,
|
stmt = template % {'user': dbname,
|
||||||
'password': "Im_a_lumberjack"}
|
'password': PASSWORD}
|
||||||
if verbosity >= 2:
|
if verbosity >= 2:
|
||||||
print stmt
|
print stmt
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user