Skip to content

Commit f356622

Browse files
committed
Update testcase.
1 parent b8223e6 commit f356622

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="IP2WHOIS",
8-
version="2.2.3",
8+
version="2.2.4",
99
author="IP2WHOIS",
1010
author_email="support@ip2whois.com",
1111
description="IP2WHOIS Python SDK to help user to check WHOIS information for a particular domain.",

src/ip2whois/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ def __init__(self, apikey, usessl=True):
4040
self.apikey = apikey
4141
self.usessl = usessl
4242

43-
def lookup(self, source_version, domain = '', source = ''):
43+
def lookup(self, domain = '', source_version = '2.2.4', source = ''):
4444

4545
try:
46-
parameters = urlencode((("key", self.apikey), ("format", 'json'), ("domain", domain if domain else ''), ("source", source if source else 'Python'), ('source_version', source_version)))
46+
parameters = urlencode((("key", self.apikey), ("format", 'json'), ("domain", domain if domain else ''), ("source", source if source else 'sdk-python'), ('source_version', source_version)))
4747
response = httprequest(parameters, self.usessl)
4848
return response
4949
except:

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_lookup(global_data):
2626
def test_function_exist(global_data):
2727
ip2whois_init = ip2whois.Api(global_data["apikey"])
2828
errors = []
29-
functions_list = ['lookup', 'getPunycode', 'getNormalText']
29+
functions_list = ['lookup', 'getPunycode', 'getNormalText', 'getDomainName', 'getDomainExtension']
3030
for x in range(len(functions_list)):
3131
# assert hasattr(mbv, functions_list[x]) == True, "Function did not exist."
3232
if (hasattr(ip2whois_init, functions_list[x]) is False):

0 commit comments

Comments
 (0)