mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix pre commit
This commit is contained in:
parent
d19de8d67f
commit
d9d0a6806f
2 changed files with 8 additions and 6 deletions
|
@ -1 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Unit tests for engines
|
||||
"""
|
||||
|
|
|
@ -4,14 +4,14 @@ from tests.support.mock import MagicMock, patch
|
|||
|
||||
|
||||
def test_engine_module_name():
|
||||
engine = salt.engines.Engine('foobar', {}, 'foobar.start', {}, {}, {}, {})
|
||||
assert engine.name == 'foobar'
|
||||
engine = salt.engines.Engine("foobar", {}, "foobar.start", {}, {}, {}, {})
|
||||
assert engine.name == "foobar"
|
||||
|
||||
|
||||
def test_engine_title_set():
|
||||
engine = salt.engines.Engine('foobar', {}, 'foobar.start', {}, {}, {}, {})
|
||||
with patch('salt.utils.process.appendproctitle', MagicMock()) as mm:
|
||||
engine = salt.engines.Engine("foobar", {}, "foobar.start", {}, {}, {}, {})
|
||||
with patch("salt.utils.process.appendproctitle", MagicMock()) as mm:
|
||||
with pytest.raises(KeyError):
|
||||
# The method does not exist so a KeyError will be raised.
|
||||
engine.run()
|
||||
mm.assert_called_with('foobar')
|
||||
mm.assert_called_with("foobar")
|
||||
|
|
Loading…
Add table
Reference in a new issue