From 2ef34d1fd6d6fe6d347df97bf404be940cf9730e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 27 Jun 2013 13:49:50 +0100 Subject: [PATCH] Updated `integration.states.ssh` test suite to use `salttesting.helpers.ensure_in_syspath()` --- tests/integration/states/ssh.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/tests/integration/states/ssh.py b/tests/integration/states/ssh.py index c6ea8300c5..8b1d3abf15 100644 --- a/tests/integration/states/ssh.py +++ b/tests/integration/states/ssh.py @@ -1,22 +1,17 @@ ''' Test the ssh_known_hosts state ''' + +# Import python libs import os import shutil -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 KNOWN_HOSTS = os.path.join(integration.TMP, 'known_hosts') GITHUB_FINGERPRINT = '16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48'