generated from br3ndonland/template-python
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#4 5ba0726 - Remove the `mocker.patch.object(logger.debug)` lines - Return a `MockerFixture` instead of `logging.Logger` (TODO: ?) - Remove `# type: ignore[attr-defined] # noqa: E501` mypy and Flake8 comments: now that the logger is a proper `MockerFixture`, pytest and pytest-mock will create the necessary attributes automatically. WIP notes: pytest passing, mypy has errors Having some trouble integrating the mock and the logger. If I make `mock_logger` a `logging.Logger` instance, it doesn't have the mock methods like `assert_has_calls`. However, if I make it `MockerFixture`, it doesn't have access to logger attributes (even after patching). I may need to instantiate a `MagicMock`.
- Loading branch information
1 parent
edcc361
commit f100d04
Showing
2 changed files
with
48 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters