Skip to content

Commit

Permalink
Fix import in test_proposal.py
Browse files Browse the repository at this point in the history
This branch uses different mechanism to gather deepsea minion targets,
so a mock of the salt call is needed.

Signed-off-by: Alexander Graul <[email protected]>
  • Loading branch information
agraul committed Aug 27, 2018
1 parent 2d3fc82 commit 092819f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit/runners/test_proposal.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from srv.modules.runners import proposal
import pytest
from mock import patch, mock_open, call
import sys
from collections import namedtuple
sys.path.insert(0, 'srv/modules/pillar')

# importing proposals triggers a salt call that returns a deepsea_minions target
with patch('salt.client.LocalClient', autospec=True) as mock_client:
mock_client.cmd.return_value = '*'
from srv.modules.runners import proposal

@pytest.fixture
def minions():
Expand Down

0 comments on commit 092819f

Please sign in to comment.