1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Applied ignore_warnings to Django tests

This commit is contained in:
Claude Paroz
2014-12-21 21:19:05 +01:00
parent 66f9a74b45
commit 51890ce889
57 changed files with 513 additions and 711 deletions

View File

@@ -3,7 +3,6 @@ from __future__ import unicode_literals
import datetime
from decimal import Decimal
import unittest
import warnings
from django import test
from django import forms
@@ -800,16 +799,15 @@ class PromiseTest(test.TestCase):
int)
def test_IPAddressField(self):
with warnings.catch_warnings(record=True):
warnings.simplefilter("always")
lazy_func = lazy(lambda: '127.0.0.1', six.text_type)
self.assertIsInstance(
IPAddressField().get_prep_value(lazy_func()),
six.text_type)
lazy_func = lazy(lambda: 0, int)
self.assertIsInstance(
IPAddressField().get_prep_value(lazy_func()),
six.text_type)
# Deprecation silenced in runtests.py
lazy_func = lazy(lambda: '127.0.0.1', six.text_type)
self.assertIsInstance(
IPAddressField().get_prep_value(lazy_func()),
six.text_type)
lazy_func = lazy(lambda: 0, int)
self.assertIsInstance(
IPAddressField().get_prep_value(lazy_func()),
six.text_type)
def test_GenericIPAddressField(self):
lazy_func = lazy(lambda: '127.0.0.1', six.text_type)