mirror of
https://github.com/django/django.git
synced 2025-08-15 16:20:37 +00:00
[1.9.x] Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite.
Backport of 1c5f4e86bc
from master
This commit is contained in:
parent
cfa3d4a256
commit
ef78aec222
6 changed files with 19 additions and 34 deletions
|
@ -203,6 +203,7 @@ class PostgreSQLTests(TestCase):
|
|||
with warnings.catch_warnings(record=True) as w:
|
||||
with mock.patch('django.db.backends.base.base.BaseDatabaseWrapper.connect',
|
||||
side_effect=mocked_connect, autospec=True):
|
||||
warnings.simplefilter('always', RuntimeWarning)
|
||||
nodb_conn = connection._nodb_connection
|
||||
self.assertIsNotNone(nodb_conn.settings_dict['NAME'])
|
||||
self.assertEqual(nodb_conn.settings_dict['NAME'], connection.settings_dict['NAME'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue