Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d-rede committed Feb 9, 2023
1 parent f553278 commit f14185b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/test_data/json/no_root.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"result": {"assignedto_id": null,
"comment": "",
"defects": null,
"elapsed": "50ms",
"elapsed": "1s",
"junit_result_unparsed": [],
"status_id": 1,
"case_id": null,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_junit_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_junit_xml_parser_valid_files(
env.case_matcher = Matchers.AUTO
env.file = input_xml_path
file_reader = JunitParser(env)
read_junit = self.__clear_unparsable_junit_elements(file_reader.parse_file())
read_junit = self.__clear_unparsable_junit_elements(file_reader.parse_file()[0])
parsing_result_json = asdict(read_junit)
file_json = open(expected_path)
expected_json = json.load(file_json)
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_junit_xml_parser_id_matcher_name(
env.case_matcher = matcher
env.file = input_xml_path
file_reader = JunitParser(env)
read_junit = self.__clear_unparsable_junit_elements(file_reader.parse_file())
read_junit = self.__clear_unparsable_junit_elements(file_reader.parse_file()[0])
parsing_result_json = asdict(read_junit)
file_json = open(expected_path)
expected_json = json.load(file_json)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_results_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def result_uploader_data_provider(self, mocker):
"trcli.api.results_uploader.ApiRequestHandler"
)
results_uploader = ResultsUploader(
environment=environment, result_file_parser=junit_file_parser
environment=environment, suite=junit_file_parser
)
yield environment, api_request_handler, results_uploader

Expand Down Expand Up @@ -726,7 +726,7 @@ def test_instantiate_api_client(
environment.timeout = timeout
timeout_expected_result = 30 if not timeout else timeout
result_uploader = ResultsUploader(
environment=environment, result_file_parser=junit_file_parser
environment=environment, suite=junit_file_parser
)

api_client = result_uploader.instantiate_api_client()
Expand Down

0 comments on commit f14185b

Please sign in to comment.