Replace %s with format
@@ -50,22 +50,22 @@ class DummyHandler(object):
if parameters is None:
return len(self._parameters) == 0
if len(parameters) != len(self._parameters):
- raise ValueError("Wrong number of parameters for method '%s'. \
- Found: %d. Expected %d",
- (method_name,
+ raise ValueError("Wrong number of parameters for method '{}'. \
+ Found: {}. Expected {}").format(
+ method_name,
len(self._parameters),
- len(parameters)))
+ len(parameters))
for key in parameters:
if key in self._parameters:
# check value
if self._parameters[key] != parameters[key]:
- raise ValueError("".join(("Wrong '%s' parameter ",
- "value for method '%s'. ",
- "Found:'%s'. Expected:'%s'",
- (method_name,
+ raise ValueError("Wrong '{}' parameter \
+ value for method '{}'. \
+ Found:'{}'. Expected:'{}'").format(
+ method_name,
key,
self._parameters[key],
- parameters[key]))))
+ parameters[key])
else:
raise ValueError("Parameter '%s' not found in method '%s'",
(str(key), method_name))
