From 3ebe8f227ac2f0df20495f443ec63d505f99d323 Mon Sep 17 00:00:00 2001 From: Sergey Romanyuk Date: Fri, 5 Jan 2024 15:01:06 -0500 Subject: [PATCH] Fix pylint warning --- nautobot_chatops/tests/nso/test_nso.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nautobot_chatops/tests/nso/test_nso.py b/nautobot_chatops/tests/nso/test_nso.py index a8da889c..995a787f 100644 --- a/nautobot_chatops/tests/nso/test_nso.py +++ b/nautobot_chatops/tests/nso/test_nso.py @@ -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"], @@ -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"}, )