cook: always mock notify_agents in tests (#72335)
This commit is contained in:
parent
12b1b5096b
commit
50ef55637d
|
@ -26,6 +26,12 @@ from hobo.environment.models import (
|
|||
from hobo.profile.models import AttributeDefinition
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mocked_notify_agents():
|
||||
with patch('hobo.environment.management.commands.cook.notify_agents') as mocked_notify_agents:
|
||||
yield mocked_notify_agents
|
||||
|
||||
|
||||
def test_check_action(monkeypatch):
|
||||
"""no exception raised if url are available"""
|
||||
command = Command()
|
||||
|
@ -89,7 +95,6 @@ def test_handle():
|
|||
assert command.run_cook.mock_calls == [call('recipe.json')]
|
||||
|
||||
|
||||
@patch('hobo.environment.management.commands.cook.notify_agents')
|
||||
def test_run_cook(mocked_notify_agents, tmpdir):
|
||||
command = Command()
|
||||
command.permissive = False
|
||||
|
|
Loading…
Reference in New Issue