INNER CODE UNIT · Python
test_render_report_url
apache/ozone · dev-support/ci/test_junit_summary.py:152
def test_render_report_url(self):
os.environ["JUNIT_REPORT_URL"] = "https://example.com/artifact"
try:
md = junit_summary.render_summary(self.make_cases())
finally:
del os.environ["JUNIT_REPORT_URL"]
self.assertIn("[Download test artifacts](https://example.com/artifact)", md)
class TestMain(unittest.TestCase):
write_report = TestParseReport.write_report
def run_main(self, argv):
out = io.StringIO()
with contextlib.redirect_stdout(out):
code = junit_summary.main(argv)
return code, out.getvalue()