Add from __future__ import absolute_import

This commit is contained in:
Pedro Algarvio 2014-11-21 19:05:13 +00:00
parent 0e3dc486a6
commit 60f215f191
218 changed files with 527 additions and 97 deletions

View file

@ -10,6 +10,7 @@
# pylint: disable=file-perms
from __future__ import absolute_import
import errno
import glob
import logging

View file

@ -8,7 +8,7 @@ This script is a generic tool to test event output
'''
# Import Python libs
from __future__ import print_function
from __future__ import absolute_import, print_function
import optparse
import pprint
import time

View file

@ -5,7 +5,7 @@ Set up the Salt integration test suite
'''
# Import Python libs
from __future__ import print_function
from __future__ import absolute_import, print_function
import os
import re
import sys

View file

@ -2,6 +2,8 @@
'''
:codeauthor: :email:`Nicole Thomas <nicole@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Libs
import integration

View file

@ -34,6 +34,8 @@
$ python tests/runtests.py -C --ssh
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Libs
import integration

View file

@ -12,6 +12,8 @@
localhost:
localhost
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Libs
import integration

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,5 +1,8 @@
# coding: utf-8
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import integration

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
# Import Salt Testing Libs

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -8,6 +8,7 @@ _virtual__ with the value __opts__
'''
# Import python libs
from __future__ import absolute_import
import logging
# Set up logging

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging

View file

@ -2,6 +2,7 @@
'''
Module for running arbitrary tests
'''
from __future__ import absolute_import
__virtualname__ = 'test'

View file

@ -1,8 +1,12 @@
# -*- coding: utf-8 -*-
import salt.utils.decorators
# Import Python libs
from __future__ import absolute_import
import time
# Import Salt libs
import salt.utils.decorators
def _fallbackfunc():
return False, 'fallback'

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import tempfile

View file

@ -3,6 +3,9 @@
Module for running arbitrary tests
'''
# Import Python libs
from __future__ import absolute_import
def jinja_error():
'''

View file

@ -1,5 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
__docformat__ = 'restructuredtext en'

View file

@ -2,6 +2,8 @@
'''
:codeauthor: :email:`Mike Place <mp@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.unit import skipIf

View file

@ -2,6 +2,13 @@
'''
:codeauthor: :email:`Mike Place <mp@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
import copy
import os
import logging
import pwd
import shutil
# Import Salt Testing libs
from salttesting import skipIf
@ -10,13 +17,6 @@ from salttesting.mock import patch, NO_MOCK, NO_MOCK_REASON
ensure_in_syspath('../..')
# Import Python libs
import copy
import os
import logging
import pwd
import shutil
# Import salt libs
import integration
from salt.fileserver import gitfs

View file

@ -3,6 +3,10 @@
:codeauthor: :email:`Mike Place <mp@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import ensure_in_syspath
@ -16,9 +20,6 @@ from salt import fileclient
roots.__opts__ = {}
# Import Python libs
import os
@skipIf(NO_MOCK, NO_MOCK_REASON)
class RootsTest(integration.ModuleCase):

View file

@ -9,6 +9,9 @@
Test Salt's loader regarding external overrides
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../')

View file

@ -6,6 +6,9 @@
Test Salt's loader regarding globals that it should pack in
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../')

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
# Import Salt Testing Libs

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import sys
import tempfile

View file

@ -3,6 +3,9 @@
'''
Validate the config system
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import hashlib

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,5 +1,10 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import os
import shutil
# Import Salt Testing libs
from salttesting.helpers import (ensure_in_syspath, destructiveTest)
ensure_in_syspath('../../')
@ -9,10 +14,6 @@ import integration
import salt.utils
from salttesting import skipIf
# Import Python libs
import os
import shutil
class DiskModuleVirtualizationTest(integration.ModuleCase):
'''

View file

@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
'''
Test the django module
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import ensure_in_syspath

View file

@ -6,6 +6,7 @@ Tests for integration with Docker's Python library
__author__ = 'cro'
# Import python libs
from __future__ import absolute_import
import string
import os

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import time
import threading
from Queue import Queue, Empty

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import getpass
import grp
import pwd

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import Python Libs
from __future__ import absolute_import
import shutil
import subprocess
import tempfile

View file

@ -4,6 +4,7 @@
Test the grains module
'''
# Import python libs
from __future__ import absolute_import
import os
import time

View file

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
'''
Test the hosts module
'''
# Import python libs
from __future__ import absolute_import
import os
import shutil

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import shutil

View file

@ -4,6 +4,9 @@
Test the lxc module
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath, skip_if_not_root, skip_if_binaries_missing
ensure_in_syspath('../../')

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -4,6 +4,7 @@
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string

View file

@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
'''
Test the salt mine system
'''
# Import Pytohn libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import logging
# Import Salt Testing libs

View file

@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# Import Python Libs
from __future__ import absolute_import
from distutils.version import LooseVersion # pylint: disable=import-error,no-name-in-module
# Import Salt Testing libs

View file

@ -7,6 +7,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import pwd
import shutil

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -5,9 +5,8 @@
tests.integration.modules.pw_user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
from __future__ import absolute_import
import os
import string
import random

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -4,6 +4,7 @@
Test the ssh module
'''
# Import python libs
from __future__ import absolute_import
import os
import shutil

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import shutil

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python
from __future__ import absolute_import
import os
import time
import subprocess

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import sys
# Import Salt Testing libs

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import re
# Import Salt Testing libs

View file

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import string
import random

View file

@ -3,6 +3,9 @@
Validate the virt module
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath, requires_salt_modules
ensure_in_syspath('../../')

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import tempfile

View file

@ -1,5 +1,8 @@
# coding: utf-8
# Import python libs
from __future__ import absolute_import
# Import salttesting libs
from salttesting import mock
from salttesting.unit import skipIf

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import Python Libs
from __future__ import absolute_import
import json
import time

View file

@ -1,6 +1,7 @@
# encoding: utf-8
# Import Python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -4,17 +4,19 @@
'''
# Import Salt Libs
import traceback
import integration
from __future__ import absolute_import
import os
import copy
from salt.output import display_output
import traceback
# Import Salt Testing Libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# Import Salt libs
from salt.output import display_output
import integration
class OutputReturnTest(integration.ShellCase):
'''

View file

@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
'''
Tests for the fileserver runner
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath

View file

@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
'''
Tests for the salt-run command
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath

View file

@ -2,6 +2,9 @@
'''
Tests for the salt-run command
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
'''
Tests for the salt-run command
'''
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -3,6 +3,9 @@
Test Salt's argument parser
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath, requires_salt_modules

View file

@ -5,6 +5,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import pwd
import random

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import sys
import re

View file

@ -8,6 +8,8 @@
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
'''
# Import Python libs
from __future__ import absolute_import
# Import salt testing libs
from salttesting.unit import skipIf

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import yaml
import pipes

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import yaml
import shutil

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import yaml
import signal

View file

@ -4,6 +4,9 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import yaml
import shutil

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import yaml
import signal

View file

@ -5,6 +5,7 @@ Tests for the salt-run command
'''
# Import python libs
from __future__ import absolute_import
import os
import yaml
import shutil

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import yaml
import signal

View file

@ -2,8 +2,16 @@
'''
salt-ssh testing
'''
# Import Python libs
from __future__ import absolute_import
# Import salttesting libs
from salttesting.unit import skipIf
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# Import Salt libs
import integration
from salttesting import skipIf
@skipIf(True, 'Not ready for production')

View file

@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
'''
Tests for the file state
'''
# Import python libs
from __future__ import absolute_import
import tempfile
# Import Salt Testing libs

View file

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
'''
tests for host state
'''
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -5,6 +5,7 @@ Tests for the file state
'''
# Import python libs
from __future__ import absolute_import
import glob
import grp
import os

View file

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
'''
Tests for the Git state
'''
# Import python libs
from __future__ import absolute_import
import os
import shutil
import socket

View file

@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
'''
tests for host state
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
'''
tests for host state
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')

View file

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
'''
tests for host state
'''
# Import python libs
from __future__ import absolute_import
import os
import shutil

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
'''
Tests for the MySQL states
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import (

View file

@ -4,6 +4,8 @@
tests.integration.states.npm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting import skipIf

View file

@ -8,6 +8,7 @@
'''
# Import python libs
from __future__ import absolute_import
import os
import pwd
import glob

View file

@ -3,6 +3,10 @@
'''
tests for pkg state
'''
# Import python libs
from __future__ import absolute_import
import os
import time
# Import Salt Testing libs
from salttesting import skipIf
@ -14,10 +18,6 @@ from salttesting.helpers import (
)
ensure_in_syspath('../../')
# Import python libs
import os
import time
# Import salt libs
import integration
import salt.utils

View file

@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
'''
tests for pkgrepo states
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import (

View file

@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
'''
Tests for the rabbitmq state
'''
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

View file

@ -3,8 +3,8 @@
'''
Tests for the rabbitmq state
'''
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs

Some files were not shown because too many files have changed in this diff Show more