Skip to content

Commit 3eaa150

Browse files
Evgeny VaginRoman Plevka
authored andcommitted
Fixes for fail on empty issue type and disabling quotes escaping
1 parent 3e2c42a commit 3eaa150

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pytest_reportportal/listener.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def pytest_runtest_makereport(self, item):
4949

5050
if report.longrepr:
5151
self.PyTestService.post_log(
52-
escape(report.longreprtext),
52+
escape(report.longreprtext, False),
5353
loglevel='ERROR',
5454
)
5555

@@ -110,6 +110,8 @@ def _add_issue_info(self, item, report):
110110
if "issue_type" in mark.kwargs:
111111
issue_type = mark.kwargs["issue_type"]
112112

113+
issue_type = "TI" if issue_type is None else issue_type
114+
113115
if issue_type and self.PyTestService.issue_types \
114116
and (issue_type in self.PyTestService.issue_types):
115117
if comment:

pytest_reportportal/service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def init_service(self, endpoint, project, uuid, log_batch_size,
9898
# verify_ssl=verify_ssl
9999
)
100100
if self.RP and hasattr(self.RP.rp_client, "get_project_settings"):
101-
self.project_settiings = self.RP.rp_client.get_project_settings()
101+
self.project_settings = self.RP.rp_client.get_project_settings()
102102
else:
103-
self.project_settiings = None
103+
self.project_settings = None
104104
self.issue_types = self.get_issue_types()
105105
else:
106106
log.debug('The pytest is already initialized')
@@ -300,11 +300,11 @@ def _stop_if_necessary(self):
300300

301301
def get_issue_types(self):
302302
issue_types = {}
303-
if not self.project_settiings:
303+
if not self.project_settings:
304304
return issue_types
305305

306306
for item_type in ("AUTOMATION_BUG", "PRODUCT_BUG", "SYSTEM_ISSUE", "NO_DEFECT", "TO_INVESTIGATE"):
307-
for item in self.project_settiings["subTypes"][item_type]:
307+
for item in self.project_settings["subTypes"][item_type]:
308308
issue_types[item["shortName"]] = item["locator"]
309309

310310
return issue_types

0 commit comments

Comments
 (0)