← Back to issue list

fix(tests): replace ineffective call assertions

View original Github issue

Metadata

Project
craft-parts
Number
#563
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged to main, resolving issue #368 by replacing ineffective assert_has_calls with assert mock_calls in packages.deb module tests. Approved by two reviewers, passed CI, and rebased before final merge.

Suggested action:

No scores available.

Issue body

Tests for the packages.deb module incorrectly use `assert_has_calls` which is ineffective in certain situations. Normalize to assert `mock_calls` instead. Fixes #368 - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to main, resolving issue #368 by replacing ineffective assert_has_calls with assert mock_calls in packages.deb module tests. Approved by two reviewers, passed CI, and rebased before final merge.
qwen3.6-35b-a3b-mtp-q6 Replaced ineffective assert_has_calls with mock_calls in packages.deb module tests, resolving issue #368. Merged after rebasing onto main.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3024 tests: remove usage of FakeApt fixtures in lifecycle snapcraft merged Merged changes replacing FakeApt fixtures in lifecycle tests with targeted mock.patch calls and related cleanup. Approved by one reviewer and passed CI checks.
71%
#1749 fix(tests): remove Mantic base charmcraft merged Merged removal of the EOL Ubuntu Mantic base from tests to resolve launch failures. Oracular replacement is deferred pending upstream fixes. Approved by two reviewers, passed CI, and modified four files.
71%
#986 fix(tests): don't fail if you have additional JREs craft-parts merged Merged a fix preventing test failures when additional JREs are installed. Approved by two reviewers, passed CI, and modified one file with two line changes. Resolves #985.
70%
#278 tests: additional tests to improve coverage fetch-service merged Merged after two reviews and passing CI checks. Adds additional tests across ten files to improve code coverage, changing +386/-60 lines.
70%