Fix some lint and pre-commit

This commit is contained in:
Twangboy 2023-03-30 08:15:59 -06:00 committed by Pedro Algarvio
parent 7978b9117d
commit 6bc8fe8111
2 changed files with 3 additions and 4 deletions

View file

@ -486,7 +486,7 @@ def status(name, *args, **kwargs):
.. versionchanged:: 2018.3.0
The service name can now be a glob (e.g. ``salt*``)
.. versionchanged:: 3006
.. versionchanged:: 3006.0
Returns "Not Found" if the service is not found on the system
Args:

View file

@ -21,6 +21,7 @@ pytestmark = [
pytest.mark.skip_unless_on_windows,
]
@pytest.fixture
def configure_loader_modules():
return {win_service: {}}
@ -315,9 +316,7 @@ def test_enable():
Test to enable the named service to start at boot
"""
mock_modify = MagicMock(return_value=True)
mock_info = MagicMock(
return_value={"StartType": "Auto", "StartTypeDelayed": False}
)
mock_info = MagicMock(return_value={"StartType": "Auto", "StartTypeDelayed": False})
with patch.object(win_service, "modify", mock_modify):
with patch.object(win_service, "info", mock_info):
assert win_service.enable("spongebob") is True