fix pre-commit

This commit is contained in:
Joe Eacott 2020-05-06 11:03:54 -06:00 committed by Daniel Wozniak
parent 426ee2c342
commit 7d90120182
4 changed files with 10 additions and 10 deletions

View file

@ -18,8 +18,8 @@ import salt.returners
import salt.utils.args
import salt.utils.files
import salt.utils.jid
from salt.exceptions import SaltClientError
import salt.utils.master
from salt.exceptions import SaltClientError
# Import 3rd-party libs
from salt.ext import six
@ -35,7 +35,7 @@ log = logging.getLogger(__name__)
def master():
'''
"""
Return the actively executing runners for the master
CLI Example:
@ -43,7 +43,7 @@ def master():
.. code-block:: bash
salt-run jobs.master
'''
"""
return salt.utils.master.get_running_jobs(__opts__)

View file

@ -16,7 +16,7 @@ log = logging.getLogger(__name__)
class CacheTest(ShellCase):
"""
Test the cache runner
Test the cache runner.
"""
@skipIf(True, "SLOWTEST skip")

View file

@ -17,7 +17,7 @@ from tests.support.unit import skipIf
@pytest.mark.windows_whitelisted
class JobsTest(ShellCase):
"""
Test the jobs runner
Test the jobs runner.
"""
@skipIf(True, "SLOWTEST skip")

View file

@ -32,7 +32,7 @@ class RunnerReturnsTest(ShellCase):
"""
self.job_dir = os.path.join(self.master_opts["cachedir"], "jobs")
self.hash_type = self.master_opts["hash_type"]
self.master_d_dir = os.path.join(RUNTIME_VARS.TMP_CONF_DIR, "master.d")
self.master_d_dir = os.path.join(self.config_dir, "master.d")
try:
os.makedirs(self.master_d_dir)
except OSError as exc:
@ -67,8 +67,8 @@ class RunnerReturnsTest(ShellCase):
# Pop off dynamic keys in the return schema that are impossible to test.
# Do not supply the default arguments because we want to know if we are
# missing some aspect of the schema.
data.pop('_stamp')
data.pop('pid')
data.pop("_stamp")
data.pop("pid")
def write_conf(self, data):
"""
@ -115,8 +115,8 @@ class RunnerReturnsTest(ShellCase):
"return.p",
)
serial = salt.payload.Serial(self.master_opts)
with salt.utils.files.fopen(serialized_return, 'rb') as fp_:
deserialized = serial.loads(fp_.read(), encoding='utf-8')
with salt.utils.files.fopen(serialized_return, "rb") as fp_:
deserialized = serial.loads(fp_.read(), encoding="utf-8")
self.clean_return(deserialized["return"])