Skip to content

Commit

Permalink
Use setup_loader for cmdmod test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch3LL committed Mar 10, 2021
1 parent 149153a commit 355fbc2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/pytests/unit/modules/test_cmdmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
MOCK_SHELL_FILE = "# List of acceptable shells\n" "\n" "/bin/bash\n"


@pytest.fixture
def configure_loader_modules():
return {cmdmod: {}}
@pytest.fixture(autouse=True)
def setup_loader():
setup_loader_modules = {cmdmod: {}}
with pytest.helpers.loader_mock(setup_loader_modules) as loader_mock:
yield loader_mock


@pytest.fixture(scope="module")
Expand Down

0 comments on commit 355fbc2

Please sign in to comment.