Skip to content

Commit

Permalink
fix:lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
souvikg10 committed Jul 3, 2023
1 parent 885dcf9 commit 6cf1ac7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ def test_plugin_attach_sanic_app_extension(
endpoint.run("actions")
manager.hook.attach_sanic_app_extensions.assert_called_once_with(app=app_mock)


def test_plugins_not_found(monkeypatch):
# Mock the import statement to raise ModuleNotFoundError
monkeypatch.setitem(__builtins__, 'import',
MagicMock(side_effect=ModuleNotFoundError))
monkeypatch.setitem(
__builtins__, "import", MagicMock(side_effect=ModuleNotFoundError)
)

# Call the method under test
try:
Expand Down

0 comments on commit 6cf1ac7

Please sign in to comment.