Skip to content

Commit

Permalink
Fix broken ssh slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Dec 7, 2020
1 parent d82cbf5 commit fb94ccb
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions salt/modules/test.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# -*- coding: utf-8 -*-
"""
Module for running arbitrary tests
"""
from __future__ import absolute_import, print_function, unicode_literals

# Import Python libs
import logging
import os
import random
import sys
import time
import traceback

# Import Salt libs
import salt.exceptions
import salt.loader
import salt.utils.args
Expand Down Expand Up @@ -82,7 +78,7 @@ def module_report():
if hasattr(__salt__, ref):
ret["module_attrs"].append(ref)
for func in __salt__[ref]:
full = "{0}.{1}".format(ref, func)
full = "{}.{}".format(ref, func)
if hasattr(getattr(__salt__, ref), func):
ret["function_attrs"].append(full)
if func in __salt__[ref]:
Expand Down Expand Up @@ -293,11 +289,11 @@ def arg_type(*args, **kwargs):
ret = {"args": [], "kwargs": {}}
# all the args
for argument in args:
ret["args"].append(six.text_type(type(argument)))
ret["args"].append(str(type(argument)))

# all the kwargs
for key, val in six.iteritems(kwargs):
ret["kwargs"][key] = six.text_type(type(val))
for key, val in kwargs.items():
ret["kwargs"][key] = str(type(val))

return ret

Expand Down Expand Up @@ -424,7 +420,7 @@ def provider(module):
"""
func = ""
for key in __salt__:
if not key.startswith("{0}.".format(module)):
if not key.startswith("{}.".format(module)):
continue
func = key
break
Expand Down Expand Up @@ -493,7 +489,7 @@ def opts_pkg():
"""
ret = {}
ret.update(__opts__)
ret["grains"] = __grains__
ret["grains"] = __grains__.value()
return ret


Expand Down

0 comments on commit fb94ccb

Please sign in to comment.