Mercurial > p > roundup > code
changeset 8261:28c5030757d3
fix: cae1bbf2536b - expression errors not setting result properly
Rather than setting 'result' in renderContext, I was wrirting the
output directly, but was stil falling through to where result would be
used.
This caused email to be sent to the admin and when test_mailgw was
called the mail-test.log was somehow created and caused the test there
to fail.
Fixed renderContext to use result variable and output contents of
mail-test.log to make debugging easier.
This should fix CI failure.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 05 Jan 2025 00:59:12 -0500 |
| parents | 617d85ce4ac3 |
| children | 2a7c3eeaf167 |
| files | roundup/cgi/client.py test/test_mailgw.py |
| diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/client.py Sat Jan 04 22:34:47 2025 -0500 +++ b/roundup/cgi/client.py Sun Jan 05 00:59:12 2025 -0500 @@ -2233,7 +2233,7 @@ except ExpressionError as e: self.add_error_message(str(e)) self.template = "search" - self.write_html(self.renderContext()) + result = self.renderContext() if 'Content-Type' not in self.additional_headers: self.additional_headers['Content-Type'] = pt.content_type
--- a/test/test_mailgw.py Sat Jan 04 22:34:47 2025 -0500 +++ b/test/test_mailgw.py Sun Jan 05 00:59:12 2025 -0500 @@ -539,6 +539,9 @@ This is a test submission of a new issue. ''') userlist = self.db.user.list() + if os.path.exists(SENDMAILDEBUG): + with open(SENDMAILDEBUG) as f: + print(f.read()) assert not os.path.exists(SENDMAILDEBUG) self.assertEqual(userlist, self.db.user.list(), "user created when it shouldn't have been")
