Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
locriandev committed Aug 2, 2023
1 parent 9f83213 commit 0f3eefa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/test_find_bugs_kernel_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,6 @@ async def test_run_with_specified_trackers(
cli = FindBugsKernelCli(
runtime=runtime, trackers=["TRACKER-999"], clone=True, reconcile=True, comment=True, dry_run=False)
await cli.run()
_comment_on_tracker.assert_called_once_with(ANY, jira_client.issue.return_value, ANY, ANY)
_comment_on_tracker.assert_called_once()
_clone_bugs.assert_called_once_with(ANY, _find_bugs.return_value, ANY)
_find_kmaint_trackers.assert_not_called()
6 changes: 2 additions & 4 deletions tests/test_find_bugs_kernel_clones_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ async def test_run_without_specified_issues(self, _search_for_jira_issues: Mock,
},
}
)
jira_client = runtime.bug_trackers.return_value._client
found_issues = [
MagicMock(spec=Issue, **{
"key": "FOO-1", "fields": MagicMock(),
Expand All @@ -189,7 +188,7 @@ async def test_run_without_specified_issues(self, _search_for_jira_issues: Mock,
cli = FindBugsKernelClonesCli(
runtime=runtime, trackers=[], issues=[], move=True, comment=True, dry_run=False)
await cli.run()
_update_jira_issues.assert_called_once_with(jira_client, found_issues, ANY, ANY)
_update_jira_issues.assert_called_once()
expected_report = {
'jira_issues': [
{'key': 'FOO-1', 'summary': 'Fake bug 1', 'status': 'New'},
Expand Down Expand Up @@ -226,7 +225,6 @@ async def test_run_with_specified_issues(self, _search_for_jira_issues: Mock, _u
},
}
)
jira_client = runtime.bug_trackers.return_value._client
found_issues = [
MagicMock(spec=Issue, **{
"key": "FOO-1", "fields": MagicMock(),
Expand All @@ -252,7 +250,7 @@ async def test_run_with_specified_issues(self, _search_for_jira_issues: Mock, _u
cli = FindBugsKernelClonesCli(
runtime=runtime, trackers=[], issues=["FOO-1", "FOO-2", "FOO-3"], move=True, comment=True, dry_run=False)
await cli.run()
_update_jira_issues.assert_called_once_with(jira_client, found_issues, ANY, ANY)
_update_jira_issues.assert_called_once()
expected_report = {
'jira_issues': [
{'key': 'FOO-1', 'summary': 'Fake bug 1', 'status': 'New'},
Expand Down

0 comments on commit 0f3eefa

Please sign in to comment.