From d401041a8d07a0f01da2b23385ae0d60e75916a0 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 27 Jun 2013 11:59:30 +0100 Subject: [PATCH] Updated `integration.modules.disk` test suite to use `salttesting.helpers.ensure_in_syspath()` --- tests/integration/modules/disk.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/tests/integration/modules/disk.py b/tests/integration/modules/disk.py index e9968921a3..bfe3e18ce3 100644 --- a/tests/integration/modules/disk.py +++ b/tests/integration/modules/disk.py @@ -1,17 +1,9 @@ -try: - import integration -except ImportError: - if __name__ == '__main__': - import os - import sys - sys.path.insert( - 0, os.path.abspath( - os.path.join( - os.path.dirname(__file__), '../../' - ) - ) - ) - import integration +# Import Salt Testing libs +from salttesting.helpers import ensure_in_syspath +ensure_in_syspath('../../') + +# Import salt libs +import integration class DiskModuleTest(integration.ModuleCase):