mirror of
https://github.com/django/django.git
synced 2025-10-15 01:39:19 +00:00
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
18 lines
486 B
Python
18 lines
486 B
Python
from django.conf import settings
|
|
from django.db import connections
|
|
from django.test import TestCase
|
|
|
|
class DatabaseSettingTestCase(TestCase):
|
|
def setUp(self):
|
|
settings.DATABASES['__test_db'] = {
|
|
'DATABASE_ENGINE': 'sqlite3',
|
|
'DATABASE_NAME': ':memory:',
|
|
}
|
|
|
|
def tearDown(self):
|
|
del settings.DATABASES['__test_db']
|
|
|
|
def test_db_connection(self):
|
|
connections['default'].cursor()
|
|
connections['__test_db'].cursor()
|