Fix unit.test_loader.LoaderGlobalsTest.test_states

This commit is contained in:
Daniel A. Wozniak 2019-04-19 17:59:58 +00:00 committed by Pedro Algarvio
parent 8694db10d7
commit 11c02a0be3
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
2 changed files with 2 additions and 1 deletions

View file

@ -629,6 +629,7 @@ class _WithDeprecated(_DeprecationDecorator):
return self._call_function(kwargs)
_decorate.__doc__ = self._function.__doc__
_decorate.__wrapped__ = self._function
return _decorate

View file

@ -981,7 +981,7 @@ class LoaderGlobalsTest(ModuleCase):
# only find salty globals
if val.__module__.startswith('salt.loaded'):
if hasattr(val, '__globals__'):
if '__wrapped__' in val.__globals__:
if hasattr(val, '__wrapped__'):
global_vars.append(sys.modules[val.__module__].__dict__)
else:
global_vars.append(val.__globals__)