Make the option properties available in the config mixin instead

This commit is contained in:
Pedro Algarvio 2017-03-25 14:41:56 +00:00
parent d05028e88c
commit 0bf7684b8c
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -1355,6 +1355,20 @@ class AdaptedConfigurationTestCaseMixIn(object):
'''
return self.get_config('master')
@property
def minion_opts(self):
'''
Return the options used for the minion
'''
return self.get_config('minion')
@property
def sub_minion_opts(self):
'''
Return the options used for the sub_minion
'''
return self.get_config('sub_minion')
class SaltMinionEventAssertsMixIn(object):
'''
@ -1488,20 +1502,6 @@ class ModuleCase(TestCase, SaltClientTestCaseMixIn):
ret = self.run_function('state.single', [function], **kwargs)
return self._check_state_return(ret)
@property
def minion_opts(self):
'''
Return the options used for the minion
'''
return self.get_config('minion')
@property
def sub_minion_opts(self):
'''
Return the options used for the sub_minion
'''
return self.get_config('sub_minion')
def _check_state_return(self, ret):
if isinstance(ret, dict):
# This is the supposed return format for state calls