65598582f5
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=179
116 lines
4.2 KiB
Diff
116 lines
4.2 KiB
Diff
From ccdef0b979c575d93e82088049ef81262320ed74 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
|
<psuarezhernandez@suse.com>
|
|
Date: Wed, 11 Mar 2020 16:14:16 +0000
|
|
Subject: [PATCH] Remove deprecated usage of NO_MOCK and NO_MOCK_REASON
|
|
|
|
---
|
|
tests/integration/pillar/test_git_pillar.py | 1 -
|
|
tests/unit/cli/test_batch_async.py | 3 +--
|
|
tests/unit/modules/test_cmdmod.py | 1 -
|
|
tests/unit/modules/test_kubeadm.py | 3 +--
|
|
tests/unit/modules/test_xfs.py | 2 +-
|
|
tests/unit/states/test_btrfs.py | 1 -
|
|
tests/unit/utils/test_pkg.py | 1 -
|
|
7 files changed, 3 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/tests/integration/pillar/test_git_pillar.py b/tests/integration/pillar/test_git_pillar.py
|
|
index 979dfebb94..987c5c5de3 100644
|
|
--- a/tests/integration/pillar/test_git_pillar.py
|
|
+++ b/tests/integration/pillar/test_git_pillar.py
|
|
@@ -1601,7 +1601,6 @@ class TestPygit2SSH(GitPillarSSHTestBase):
|
|
)
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
@skipIf(_windows_or_mac(), "minion is windows or mac")
|
|
@skip_if_not_root
|
|
@skipIf(
|
|
diff --git a/tests/unit/cli/test_batch_async.py b/tests/unit/cli/test_batch_async.py
|
|
index 82a712b15b..c0b708de76 100644
|
|
--- a/tests/unit/cli/test_batch_async.py
|
|
+++ b/tests/unit/cli/test_batch_async.py
|
|
@@ -1,11 +1,10 @@
|
|
import salt.ext.tornado
|
|
from salt.cli.batch_async import BatchAsync
|
|
from salt.ext.tornado.testing import AsyncTestCase
|
|
-from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
|
+from tests.support.mock import MagicMock, patch
|
|
from tests.support.unit import TestCase, skipIf
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
class AsyncBatchTestCase(AsyncTestCase, TestCase):
|
|
def setUp(self):
|
|
self.io_loop = self.get_new_ioloop()
|
|
diff --git a/tests/unit/modules/test_cmdmod.py b/tests/unit/modules/test_cmdmod.py
|
|
index f3348bc379..15b97f8568 100644
|
|
--- a/tests/unit/modules/test_cmdmod.py
|
|
+++ b/tests/unit/modules/test_cmdmod.py
|
|
@@ -24,7 +24,6 @@ DEFAULT_SHELL = "foo/bar"
|
|
MOCK_SHELL_FILE = "# List of acceptable shells\n" "\n" "/bin/bash\n"
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
class CMDMODTestCase(TestCase, LoaderModuleMockMixin):
|
|
"""
|
|
Unit tests for the salt.modules.cmdmod module
|
|
diff --git a/tests/unit/modules/test_kubeadm.py b/tests/unit/modules/test_kubeadm.py
|
|
index 91e4a9e68e..4940dbebb4 100644
|
|
--- a/tests/unit/modules/test_kubeadm.py
|
|
+++ b/tests/unit/modules/test_kubeadm.py
|
|
@@ -24,11 +24,10 @@ import pytest
|
|
import salt.modules.kubeadm as kubeadm
|
|
from salt.exceptions import CommandExecutionError
|
|
from tests.support.mixins import LoaderModuleMockMixin
|
|
-from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
|
+from tests.support.mock import MagicMock, patch
|
|
from tests.support.unit import TestCase, skipIf
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
class KubeAdmTestCase(TestCase, LoaderModuleMockMixin):
|
|
"""
|
|
Test cases for salt.modules.kubeadm
|
|
diff --git a/tests/unit/modules/test_xfs.py b/tests/unit/modules/test_xfs.py
|
|
index 778aff793d..28783260d0 100644
|
|
--- a/tests/unit/modules/test_xfs.py
|
|
+++ b/tests/unit/modules/test_xfs.py
|
|
@@ -3,7 +3,7 @@ import textwrap
|
|
import salt.modules.xfs as xfs
|
|
from tests.support.mixins import LoaderModuleMockMixin
|
|
from tests.support.mock import MagicMock, patch
|
|
-from tests.support.unit import TestCase
|
|
+from tests.support.unit import TestCase, skipIf
|
|
|
|
|
|
@patch("salt.modules.xfs._get_mounts", MagicMock(return_value={}))
|
|
diff --git a/tests/unit/states/test_btrfs.py b/tests/unit/states/test_btrfs.py
|
|
index 74e44641b8..b8f70bccfe 100644
|
|
--- a/tests/unit/states/test_btrfs.py
|
|
+++ b/tests/unit/states/test_btrfs.py
|
|
@@ -32,7 +32,6 @@ from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
|
from tests.support.unit import TestCase, skipIf
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
class BtrfsTestCase(TestCase, LoaderModuleMockMixin):
|
|
"""
|
|
Test cases for salt.states.btrfs
|
|
diff --git a/tests/unit/utils/test_pkg.py b/tests/unit/utils/test_pkg.py
|
|
index 404b01b12b..794b851df2 100644
|
|
--- a/tests/unit/utils/test_pkg.py
|
|
+++ b/tests/unit/utils/test_pkg.py
|
|
@@ -9,7 +9,6 @@ except ImportError:
|
|
pytest = None
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
@skipIf(pytest is None, "PyTest is missing")
|
|
class PkgRPMTestCase(TestCase):
|
|
"""
|
|
--
|
|
2.29.2
|
|
|
|
|