Skip to content

Commit b3251e1

Browse files
mshaileshr@gmail.commshaileshr@gmail.com
authored andcommitted
updated testcases and docstring
1 parent 6a54f7d commit b3251e1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ venv.bak/
105105
# mypy
106106
.mypy_cache/
107107
.idea/
108+
.vscode

contentstack/http_connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class HTTPConnection(object):
1818

19-
def __init__(self, url: str, query: dict, stack_headers: dict):
19+
def __init__(self, url, query, stack_headers):
2020

2121
"""
2222
Initialises the HTTPConnection to make Http Request
@@ -164,11 +164,11 @@ def __user_agents() -> dict:
164164
}
165165
return local_headers
166166

167-
def __is_valid_json(response):
167+
def __is_valid_json(self, json_string):
168168

169169
import json
170170
try:
171-
json.loads(response)
171+
json.loads(json_string)
172172
return True
173173
except ValueError as e:
174174
return False

0 commit comments

Comments
 (0)