mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
No need for late imports. Use AdaptedConfigurationTestCaseMixIn
.
This commit is contained in:
parent
0958656bf6
commit
bd35008d34
@ -1,17 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Import python libs
|
||||
import os
|
||||
|
||||
# Import Salt Testing libs
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import salt libs
|
||||
import integration
|
||||
from salt import config, version
|
||||
|
||||
|
||||
class TestModuleTest(integration.ModuleCase):
|
||||
class TestModuleTest(integration.ModuleCase,
|
||||
integration.AdaptedConfigurationTestCaseMixIn):
|
||||
'''
|
||||
Validate the test module
|
||||
'''
|
||||
@ -31,8 +30,8 @@ class TestModuleTest(integration.ModuleCase):
|
||||
'''
|
||||
test.version
|
||||
'''
|
||||
import salt
|
||||
self.assertEqual(self.run_function('test.version'), salt.__version__)
|
||||
self.assertEqual(self.run_function('test.version'),
|
||||
version.__saltstack_version__.string)
|
||||
|
||||
def test_conf_test(self):
|
||||
'''
|
||||
@ -46,15 +45,12 @@ class TestModuleTest(integration.ModuleCase):
|
||||
'''
|
||||
import salt.config
|
||||
opts = salt.config.minion_config(
|
||||
os.path.join(
|
||||
integration.INTEGRATION_TEST_DIR,
|
||||
'files/conf/minion'
|
||||
)
|
||||
)
|
||||
self.get_config_file_path('minion')
|
||||
)
|
||||
self.assertEqual(
|
||||
self.run_function('test.get_opts')['cachedir'],
|
||||
opts['cachedir']
|
||||
)
|
||||
self.run_function('test.get_opts')['cachedir'],
|
||||
opts['cachedir']
|
||||
)
|
||||
|
||||
def test_cross_test(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user