Commit 95e8a814 authored by Clément Schreiner's avatar Clément Schreiner
Browse files

Small fixes (result class name, ClosedBug.__str__, severity).

parent a6c16026
......@@ -49,7 +49,7 @@ from debexpo.model import meta
log = logging.getLogger(__name__)
@test_result
class ClosedbugTest(PluginResult):
class ClosedbugsTest(PluginResult):
"""
Represents the result of the 'closed bugs' test.
"""
......@@ -77,10 +77,10 @@ class ClosedbugTest(PluginResult):
plural='s' if self.nb_closed > 1 else ''))
if self.nb_errors:
strings.append('has {} bug{plural} not closed properly'.format(
strings.append('claims to be closing {} bug{plural}'.format(
self.nb_errors,
plural='s' if self.nb_closed > 1 else ''))
return 'Package ' + ' and '.join(strings)
return 'Package ' + ' but '.join(strings)
class ClosedBug(PluginResult):
"""
......@@ -179,7 +179,7 @@ class ClosedBugsPlugin(QAPlugin):
bug_result.belongs = False
bug_result.is_error = True
test_result.nb_errors += 1
severity = max(severity, constants.PLUGIN_SEVERITY_ERROR)
test_result['severity'] = max(severity, constants.PLUGIN_SEVERITY_ERROR)
continue
bug_result.exists = True
......@@ -212,6 +212,6 @@ class ClosedBugsPlugin(QAPlugin):
plugin = ClosedBugsPlugin
models = [
ClosedbugTest,
ClosedbugsTest,
ClosedBug,
]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment