From bd35008d34a58cf7ab9bdb0bc41a18294768dbef Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 14 Jun 2014 22:42:01 +0100 Subject: [PATCH] No need for late imports. Use `AdaptedConfigurationTestCaseMixIn`. --- tests/integration/modules/test.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/integration/modules/test.py b/tests/integration/modules/test.py index 32a26c91a0..104841c264 100644 --- a/tests/integration/modules/test.py +++ b/tests/integration/modules/test.py @@ -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): '''