Mercurial > p > roundup > code
view website/issues/detectors/severityauditor.py @ 6013:491fdb189a12
Restructure test code. Assign expected value to variable.
It was hardcoded into an assert. This made tracking down the failure
more difficult. Now at least I can print the two variables and diff
the output.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 31 Dec 2019 21:35:46 -0500 |
| parents | 0942fe89e82e |
| children |
line wrap: on
line source
def init_severity(db, cl, nodeid, newvalues): """Make sure severity is set on new issues""" if 'severity' in newvalues and newvalues['severity']: return normal = db.severity.lookup('normal') newvalues['severity'] = normal def init(db): db.issue.audit('create', init_severity)
