Skip to content

Commit

Permalink
Merge pull request #409 from UW-GAC/bugfix/406-workspace-audit-0-inst…
Browse files Browse the repository at this point in the history
…ances

Print the correct number of "ok" instances in audit email
  • Loading branch information
amstilp authored Oct 25, 2023
2 parents 6ad526f + eddd975 commit c44b091
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Devel

* Add filtering in list views.
* Bugfix: Print the correct number of "ok" instances in audit emails. 0.18 introduced a bug where the email included "0 instance(s) verified even if there was more than one verified instance.

## 0.18 (2023-10-03)

Expand Down
2 changes: 1 addition & 1 deletion anvil_consortium_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.19dev1"
__version__ = "0.19dev2"
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _run_audit(self, audit_results, **options):
"anvil_consortium_manager/email_audit_report.html",
context={
"model_name": audit_name,
"verified_results": len(audit_results.get_verified_results()),
"verified_results": audit_results.get_verified_results(),
"errors_table": ErrorTableWithLink(
audit_results.get_error_results()
),
Expand Down
2 changes: 2 additions & 0 deletions anvil_consortium_manager/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def test_command_run_audit_ok_email(self):
self.assertEqual(pprint.pformat(audit_results.export()), email.body)
# HTML body.
self.assertEqual(len(email.alternatives), 1)
# Check that the number of "ok" instances is correct in email body.
self.assertIn("1 instance(s) verified", email.alternatives[0][0])

def test_command_run_audit_ok_email_errors_only(self):
"""Test command output when email and errors_only is set."""
Expand Down

0 comments on commit c44b091

Please sign in to comment.