Fix masterapi AutoKey test

This commit is contained in:
Benedikt Werner 2017-12-05 18:18:27 +01:00
parent 0697ed0645
commit 449535edbd
No known key found for this signature in database
GPG Key ID: 1DBFF0F8E9E121EB

View File

@ -59,7 +59,8 @@ class AutoKeyTest(TestCase):
'''
def setUp(self):
opts = {'user': 'test_user'}
opts = salt.config.master_config(None)
opts[u'user'] = u'test_user'
self.auto_key = masterapi.AutoKey(opts)
self.stats = {}
@ -136,17 +137,6 @@ class AutoKeyTest(TestCase):
self.stats['testfile'] = {'mode': gen_permissions('w', '', ''), 'gid': 0}
self.assertTrue(self.auto_key.check_permissions('testfile'))
@skipIf(NO_MOCK, NO_MOCK_REASON)
class AutoKeyTest(TestCase):
'''
Test for the salt.daemons.masterapi.AutoKey class
'''
def setUp(self):
opts = salt.config.master_config(None)
self.auto_key = masterapi.AutoKey(opts)
def _test_check_autosign_grains(self,
test_func,
file_content=u'test_value',