Add IPv6 to tests

This commit is contained in:
2016-02-17 18:15:04 +01:00
parent 2456039df1
commit 501e5b2acf
2 changed files with 7 additions and 4 deletions
+3 -1
View File
@@ -2,12 +2,14 @@
# -*- coding: utf-8
import os
import sys
import socket
from iptogeo import IPToGeo, IPToGeoException
TIMEOUT = None
# TIMEOUT = 5.0
iptogeo = IPToGeo(timeout=TIMEOUT)
iptogeo = IPToGeo(timeout=TIMEOUT, family=socket.AF_INET6, remote_addr='::1')
def get_random_ip_v4():
ip = '%d.%d.%d.%d' % \