Skip to content

Commit

Permalink
Fix pylint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
romanukes committed Jan 5, 2024
1 parent a8ae6dd commit fad0a5d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nautobot_chatops/tests/nso/test_nso.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
HERE = path.abspath(path.dirname(__file__))


def load_api_calls(responses, fixture):
def load_api_calls(_responses, fixture):
"""Load the API calls into memory for mocking."""
with open(f"{HERE}/fixtures/{fixture}.json", "r", encoding="utf-8") as file_:
api_calls = json.load(file_)

for api_call in api_calls:
if api_call["method"] == "GET":
responses.add(
responses.GET,
_responses.add(
_responses.GET,
api_call["url"],
json=api_call["response_json"],
status=api_call["status"],
Expand All @@ -35,11 +35,11 @@ def load_api_calls(responses, fixture):
continue

if api_call["method"] == "POST":
responses.add(
responses.POST,
_responses.add(
_responses.POST,
api_call["url"],
json=api_call["response_json"],
match=[responses.matchers.json_params_matcher(api_call["body"])] if "body" in api_call else [],
match=[_responses.matchers.json_params_matcher(api_call["body"])] if "body" in api_call else [],
status=api_call["status"],
headers={"Content-Type": "application/yang-data+xml"},
)
Expand Down

0 comments on commit fad0a5d

Please sign in to comment.