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

Removed IPAddressField per deprecation timeline; refs #20439.

This commit is contained in:
Tim Graham
2015-01-17 20:42:41 -05:00
parent 5008a4db44
commit 33457cd3b0
25 changed files with 117 additions and 161 deletions

View File

@@ -752,21 +752,6 @@ class CaseExpressionTests(TestCase):
transform=lambda o: (o.integer, six.text_type(o.image))
)
def test_update_ip_address(self):
CaseTestModel.objects.update(
ip_address=Case(
# fails on postgresql if output_field is not set explicitly
When(integer=1, then=Value('1.1.1.1')),
When(integer=2, then=Value('2.2.2.2')),
output_field=models.IPAddressField(),
),
)
self.assertQuerysetEqual(
CaseTestModel.objects.all().order_by('pk'),
[(1, '1.1.1.1'), (2, '2.2.2.2'), (3, None), (2, '2.2.2.2'), (3, None), (3, None), (4, None)],
transform=attrgetter('integer', 'ip_address')
)
def test_update_generic_ip_address(self):
CaseTestModel.objects.update(
generic_ip_address=Case(