1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.8.x] Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite.

Conflicts:
	tests/apps/tests.py
	tests/migrations/test_graph.py
	tests/queryset_pickle/tests.py
	tests/runtests.py

Backport of 1c5f4e86bc from master
This commit is contained in:
Simon Charette
2015-11-13 15:54:05 -05:00
parent afe84c71eb
commit 5a6a5ce0d5
5 changed files with 17 additions and 34 deletions

View File

@@ -204,6 +204,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
del connection._nodb_connection
self.assertIsNotNone(nodb_conn.settings_dict['NAME'])