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:
committed by
Aymeric Augustin
parent
8f51ba669a
commit
1a63092981
@@ -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, [])
|
||||
|
||||
Reference in New Issue
Block a user