Skip to content

Commit 4966dce

Browse files
committed
fix clickhouse_fields.tests.IPv6FieldTests
1 parent 2f90a00 commit 4966dce

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/clickhouse_fields/tests.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import sys
1+
import ipaddress
22
from decimal import Decimal
33
from uuid import uuid4
44

@@ -612,13 +612,10 @@ def test_deconstruct(self):
612612
self.assertNotIn("max_length", kwargs)
613613

614614
def test_value(self):
615-
if sys.version_info < (3, 13):
616-
v = "::ffff:304:506"
617-
else:
618-
v = "::ffff:3.4.5.6"
615+
v = "::ffff:3.4.5.6"
619616
o = IPv6Model.objects.create(ipv6=v)
620617
o.refresh_from_db()
621-
self.assertEqual(o.ipv6, v)
618+
self.assertEqual(o.ipv6, str(ipaddress.ip_address(v)))
622619

623620
def test_filter(self):
624621
v = "::ffff:3.4.5.6"

0 commit comments

Comments
 (0)