No need for late imports. Use AdaptedConfigurationTestCaseMixIn.

This commit is contained in:
Pedro Algarvio 2014-06-14 22:42:01 +01:00
parent 0958656bf6
commit bd35008d34

View File

@ -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):
'''