summaryrefslogtreecommitdiff
path: root/test/units/plugins/cache/test_cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/units/plugins/cache/test_cache.py')
-rw-r--r--test/units/plugins/cache/test_cache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/units/plugins/cache/test_cache.py b/test/units/plugins/cache/test_cache.py
index 25b84c06..b4ffe4e3 100644
--- a/test/units/plugins/cache/test_cache.py
+++ b/test/units/plugins/cache/test_cache.py
@@ -29,7 +29,7 @@ from units.compat import unittest
from ansible.errors import AnsibleError
from ansible.plugins.cache import CachePluginAdjudicator
from ansible.plugins.cache.memory import CacheModule as MemoryCache
-from ansible.plugins.loader import cache_loader
+from ansible.plugins.loader import cache_loader, init_plugin_loader
from ansible.vars.fact_cache import FactCache
import pytest
@@ -66,7 +66,7 @@ class TestCachePluginAdjudicator(unittest.TestCase):
def test___getitem__(self):
with pytest.raises(KeyError):
- self.cache['foo']
+ self.cache['foo'] # pylint: disable=pointless-statement
def test_pop_with_default(self):
assert self.cache.pop('foo', 'bar') == 'bar'
@@ -183,6 +183,7 @@ class TestFactCache(unittest.TestCase):
assert len(self.cache.keys()) == 0
def test_plugin_load_failure(self):
+ init_plugin_loader()
# See https://github.com/ansible/ansible/issues/18751
# Note no fact_connection config set, so this will fail
with mock.patch('ansible.constants.CACHE_PLUGIN', 'json'):