move executors tests to pytest

This commit is contained in:
MKLeb 2022-08-29 16:16:16 -04:00 committed by Megan Wilhite
parent 481e9c400e
commit 4f707207a9
3 changed files with 14 additions and 13 deletions

View file

@ -0,0 +1,14 @@
import pytest
import salt.executors.splay as splay_exec
@pytest.fixture
def configure_loader_modules():
return {splay_exec: {"__grains__": {"id": "foo"}}}
def test__get_hash():
# We just want to make sure that this function does not result in an
# error due to passing a unicode value to bytearray()
assert splay_exec._get_hash()

View file

@ -1,13 +0,0 @@
import salt.executors.splay as splay_exec
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase
class SplayTestCase(TestCase, LoaderModuleMockMixin):
def setup_loader_modules(self):
return {splay_exec: {"__grains__": {"id": "foo"}}}
def test__get_hash(self):
# We just want to make sure that this function does not result in an
# error due to passing a unicode value to bytearray()
assert splay_exec._get_hash()