Skip to content

Commit 46ff501

Browse files
Fixed one pytest issue.
1 parent 1a93d81 commit 46ff501

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ dist/
77
.coverage*
88
htmlcov/
99
.tox/
10-
docs/_build/
10+
docs/_build/
11+
*.egg-info

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="ip2location-io",
8-
version="1.0.1",
8+
version="1.0.3",
99
author="IP2Location",
1010
author_email="support@ip2location.com",
1111
description="This SDK provides users with the ability to perform IP geolocation lookup and domain WHOIS lookup through a web service.",

tests/test_ipgeolocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
import ip2locationio
66

7-
def testinvalidapikey():
8-
configuration = ip2locationio.Configuration('')
7+
def testinvalidapikey(global_data):
8+
configuration = ip2locationio.Configuration(global_data["apikey"])
99
ipgeolocation = ip2locationio.IPGeolocation(configuration)
1010
try:
1111
result = ipgeolocation.lookup('8.8.8.8')
1212
except IP2LocationIOAPIError as e:
1313
assert str(e) == 'Invalid API key or insufficient credit.'
1414

15-
def testfunctionexist():
16-
configuration = ip2locationio.Configuration('')
15+
def testfunctionexist(global_data):
16+
configuration = ip2locationio.Configuration(global_data["apikey"])
1717
ipgeolocation = ip2locationio.IPGeolocation(configuration)
1818
functions_list = ['lookup']
1919
for x in range(len(functions_list)):

0 commit comments

Comments
 (0)