Pylint fixes

This commit is contained in:
Pablo Suárez Hernández 2017-06-21 10:09:11 +01:00
parent 686c45b8ab
commit 6eea8179ad
3 changed files with 6 additions and 10 deletions

View file

@ -37,6 +37,7 @@ EXCLUDED_FILES = [
'tests/consist.py',
'tests/modparser.py',
'tests/committer_parser.py',
'tests/zypp_plugin.py',
'tests/unit/transport/mixins.py',
'tests/integration/utils/testprogram.py',
]

View file

@ -7,23 +7,21 @@
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting.helpers import ensure_in_syspath
from salttesting import TestCase, skipIf
from salttesting.mock import (
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
ensure_in_syspath('../')
import os
import imp
from zypp_plugin import BogusIO
zyppnotify = imp.load_source('zyppnotify', os.path.sep.join(os.path.dirname(__file__).split(
os.path.sep)[:-2] + ['scripts', 'zypper', 'plugins', 'commit', 'zyppnotify']))
os.path.sep)[:-2] + ['scripts', 'suse', 'zypper', 'plugins', 'commit', 'zyppnotify']))
@skipIf(NO_MOCK, NO_MOCK_REASON)
class ZyppPluginsTestCase(TestCase):
@ -45,7 +43,3 @@ class ZyppPluginsTestCase(TestCase):
self.assertEqual(str(bogus_io), 'deadbeef 123\n')
self.assertEqual(bogus_io.mode, 'w')
self.assertEqual(bogus_io.path, '/var/cache/salt/minion/rpmdb.cookie')
if __name__ == '__main__':
from integration import run_tests
run_tests(ZyppPluginsTestCase, needs_daemon=False)

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
'''
Related to zypp_plugins_test.py module.
'''