diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-09 12:34:23 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-09 12:34:23 -0500 |
| commit | eb406aa686ff1809903366ef6896037af2f1f69b (patch) | |
| tree | ce0ffb535b3de8fc7de17b209d854039afd71352 | |
| parent | 9744529c1245dc675cf69fd76448aa60dc934941 (diff) | |
[1.8.x] Silenced deprecation warning in refs #24287 test.
| -rw-r--r-- | tests/app_loading/tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index 4d7337e1c4..1484ab6592 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -2,14 +2,16 @@ from __future__ import unicode_literals import os import sys +import warnings from django.apps import apps from django.core.exceptions import ImproperlyConfigured from django.db import models from django.test import TestCase from django.test.utils import extend_sys_path -from django.utils._os import upath from django.utils import six +from django.utils._os import upath +from django.utils.deprecation import RemovedInDjango19Warning class EggLoadingTest(TestCase): @@ -98,6 +100,7 @@ class GetModelsTest(TestCase): 'Ensure that its module, "models_that_do_not_live_in_an_app", ' 'is located inside an installed app.' ) - - with self.assertRaisesMessage(ImproperlyConfigured, msg): - declare_model_outside_app() + with warnings.catch_warnings(): + warnings.filterwarnings('ignore', category=RemovedInDjango19Warning) + with self.assertRaisesMessage(ImproperlyConfigured, msg): + declare_model_outside_app() |
