Skip to content

Commit

Permalink
fix: an issue with report mode
Browse files Browse the repository at this point in the history
The error occurs when running tests in `report` mode:
`'Result' object has no attribute 'to_json'`
  • Loading branch information
gibiw committed Aug 7, 2024
1 parent f6a0d55 commit c104c8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qase-python-commons/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "qase-python-commons"
version = "3.0.4"
version = "3.0.5"
description = "A library for Qase TestOps and Qase Report"
readme = "README.md"
authors = [{name = "Qase Team", email = "[email protected]"}]
Expand Down
4 changes: 2 additions & 2 deletions qase-python-commons/src/qase/commons/reporters/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def _compile_report(self):
self._store_object(run, self.report_path, "report")

# Saves a model to a file
def _store_object(self, object, path, filename):
data = object.to_json()
def _store_object(self, obj, path, filename):
data = obj.__str__()
if self.format == 'jsonp':
data = f"qaseJsonp({data});"
with open(f"{path}/{filename}.{self.format}", 'w', encoding='utf-8') as f:
Expand Down

0 comments on commit c104c8b

Please sign in to comment.