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

Fixed #20439 -- Started deprecation of IPAddressField

This commit is contained in:
Erik Romijn
2013-09-28 10:22:46 +02:00
committed by Aymeric Augustin
parent 8f51ba669a
commit 1a63092981
14 changed files with 68 additions and 12 deletions

View File

@@ -1,3 +1,4 @@
import warnings
from django.test import TestCase
from django.db import models
@@ -173,7 +174,9 @@ class FieldDeconstructionTests(TestCase):
self.assertEqual(kwargs, {})
def test_ip_address_field(self):
field = models.IPAddressField()
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
field = models.IPAddressField()
name, path, args, kwargs = field.deconstruct()
self.assertEqual(path, "django.db.models.IPAddressField")
self.assertEqual(args, [])