Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
terminalmage committed Aug 14, 2018
1 parent 81f272f commit 613f061
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
1 change: 0 additions & 1 deletion tests/integration/cloud/clouds/test_openstack.py
Expand Up @@ -175,7 +175,6 @@ def test_libcloud_auth_v3(self):
self.assertTrue(driver.auth_token)



@skipIf(not HAS_SHADE, 'openstack driver requires `shade`')
class RackspaceTest(ShellCase):
'''
Expand Down
7 changes: 4 additions & 3 deletions tests/integration/files/file/base/_grains/custom_grain1.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-


def myfunction():
grains = {}
grains['a_custom'] = {'k1': 'v1'}
return grains
grains = {}
grains['a_custom'] = {'k1': 'v1'}
return grains
7 changes: 4 additions & 3 deletions tests/integration/files/file/base/_grains/custom_grain2.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-


def myfunction():
grains = {}
grains['a_custom'] = {'k2': 'v2'}
return grains
grains = {}
grains['a_custom'] = {'k2': 'v2'}
return grains
2 changes: 1 addition & 1 deletion tests/integration/states/test_ssh_known_hosts.py
Expand Up @@ -12,7 +12,7 @@
from tests.support.case import ModuleCase
from tests.support.mixins import SaltReturnAssertsMixin
from tests.support.runtests import RUNTIME_VARS
from tests.support.helpers import skip_if_binaries_missing, skip_if_not_root
from tests.support.helpers import skip_if_binaries_missing

KNOWN_HOSTS = os.path.join(RUNTIME_VARS.TMP, 'known_hosts')
GITHUB_FINGERPRINT = '9d:38:5b:83:a9:17:52:92:56:1a:5e:c4:d4:81:8e:0a:ca:51:a2:64:f1:74:20:11:2e:f8:8a:c3:a1:39:49:8f'
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/test_loader.py
Expand Up @@ -1132,7 +1132,7 @@ def test():
@classmethod
def setUpClass(cls):
cls.opts = salt.config.minion_config(None)
cls.opts['grains'] = grains(cls.opts)
cls.opts['grains'] = salt.loader.grains(cls.opts)

def setUp(self):
# Setup the module
Expand All @@ -1145,7 +1145,7 @@ def _get_loader(self, order=None):
if order is not None:
opts['optimization_order'] = order
# Return a loader
return LazyLoader([self.module_dir], opts, tag='module')
return salt.loader.LazyLoader([self.module_dir], opts, tag='module')

def _get_module_filename(self):
# The act of referencing the loader entry forces the module to be
Expand All @@ -1170,7 +1170,7 @@ def _write_module_file(self):
os.fsync(fh.fileno())

def _byte_compile(self):
if USE_IMPORTLIB:
if salt.loader.USE_IMPORTLIB:
# Skip this check as "optimize" is unique to PY3's compileall
# module, and this will be a false error when Pylint is run on
# Python 2.
Expand All @@ -1195,7 +1195,7 @@ def _test_optimization_order(self, order):
basename = os.path.basename(filename)
assert basename == self._expected(order[0]), basename

if not USE_IMPORTLIB:
if not salt.loader.USE_IMPORTLIB:
# We are only testing multiple optimization levels on Python 3.5+
return

Expand Down Expand Up @@ -1223,7 +1223,7 @@ def test_optimization_order(self):
'''
self._test_optimization_order([0, 1, 2])
self._test_optimization_order([0, 2, 1])
if USE_IMPORTLIB:
if salt.loader.USE_IMPORTLIB:
# optimization_order only supported on Python 3.5+, earlier
# releases only support unoptimized .pyc files.
self._test_optimization_order([1, 2, 0])
Expand Down

0 comments on commit 613f061

Please sign in to comment.