mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
move matchers unit tests to pytest
This commit is contained in:
parent
5b2b6e826c
commit
3cd2d1c39e
4 changed files with 16 additions and 14 deletions
|
@ -160,7 +160,7 @@ salt/matchers/*:
|
|||
- integration.states.test_match
|
||||
- pytests.integration.cli.test_matcher
|
||||
- pytests.unit.modules.test_match
|
||||
- unit.matchers.test_confirm_top
|
||||
- pytests.unit.matchers.test_confirm_top
|
||||
|
||||
salt/proxy/*:
|
||||
- pytests.integration.proxy.test_shell
|
||||
|
|
0
tests/pytests/unit/matchers/__init__.py
Normal file
0
tests/pytests/unit/matchers/__init__.py
Normal file
15
tests/pytests/unit/matchers/test_confirm_top.py
Normal file
15
tests/pytests/unit/matchers/test_confirm_top.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import pytest
|
||||
|
||||
import salt.config
|
||||
import salt.loader
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def matchers():
|
||||
opts = salt.config.DEFAULT_MINION_OPTS.copy()
|
||||
return salt.loader.matchers(opts)
|
||||
|
||||
|
||||
def test_sanity(matchers):
|
||||
match = matchers["confirm_top.confirm_top"]
|
||||
assert match("*", []) is True
|
|
@ -1,13 +0,0 @@
|
|||
import salt.config
|
||||
import salt.loader
|
||||
from tests.support.unit import TestCase
|
||||
|
||||
|
||||
class ConfirmTop(TestCase):
|
||||
def setUp(self):
|
||||
opts = salt.config.DEFAULT_MINION_OPTS.copy()
|
||||
self.matchers = salt.loader.matchers(opts)
|
||||
|
||||
def test_sanity(self):
|
||||
match = self.matchers["confirm_top.confirm_top"]
|
||||
self.assertTrue(match("*", []))
|
Loading…
Add table
Reference in a new issue