diff --git a/tests/integration/states/git.py b/tests/integration/states/git.py index 881c8c3652..02c2fb5fba 100644 --- a/tests/integration/states/git.py +++ b/tests/integration/states/git.py @@ -40,6 +40,10 @@ class GitTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn): msg = 'error resolving {0}, possible network issue?' self.skipTest(msg.format(self.__domain)) + def tearDown(self): + # Reset the dns timeout after the test is over + socket.setdefaulttimeout(None) + def test_latest(self): ''' git.latest diff --git a/tests/integration/states/svn.py b/tests/integration/states/svn.py index cff2fdb5c9..600599fc7a 100644 --- a/tests/integration/states/svn.py +++ b/tests/integration/states/svn.py @@ -47,6 +47,8 @@ class SvnTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn): def tearDown(self): shutil.rmtree(self.target, ignore_errors=True) + # Reset the dns timeout after the test is over + socket.setdefaulttimeout(None) def test_latest(self): ''' diff --git a/tests/unit/daemons_test.py b/tests/unit/daemons_test.py index e8eecfcd9b..f83048bb7e 100644 --- a/tests/unit/daemons_test.py +++ b/tests/unit/daemons_test.py @@ -5,7 +5,6 @@ # Import python libs from __future__ import absolute_import -import sys # Import Salt Testing libs from salttesting import TestCase, skipIf @@ -19,10 +18,6 @@ import integration import multiprocessing from salt.cli import daemons -PY26 = False -if sys.version_info[1] < 7: - PY26 = True - class LoggerMock(object): ''' @@ -77,7 +72,6 @@ class LoggerMock(object): @skipIf(NO_MOCK, NO_MOCK_REASON) -@skipIf(PY26, 'These tests don\'t run on Python 2.6. Skipping.') class DaemonsStarterTestCase(TestCase, integration.SaltClientTestCaseMixIn): ''' Unit test for the daemons starter classes.