fix test coverage

This commit is contained in:
Martin Plattner 2020-07-01 23:51:55 +02:00
parent 2a4933eb9d
commit aee1b81260
2 changed files with 4 additions and 3 deletions

View File

@ -53,7 +53,7 @@ def parse_modify_spec(option) -> ModifySpec:
elif len(parts) == 3:
flow_filter_pattern, subject, replacement = parts
else:
raise ValueError(f"Invalid number of parameters (2 or 3 are expected)")
raise ValueError("Invalid number of parameters (2 or 3 are expected)")
flow_filter = flowfilter.parse(flow_filter_pattern)
if not flow_filter:

View File

@ -24,8 +24,9 @@ from mitmproxy.utils import arg_check
'SPEC Format: "username:pass", "any" to accept any user/pass combination,\n'
'"@path" to use an Apache htpasswd file, or\n'
'"ldap[s]:url_server_ldap:dn_auth:password:dn_subtree" '
'for LDAP authentication.')
'for LDAP authentication.'),
(["--replacements"], "--replacements is deprecated.\n"
"Please use `--modify-body` or `--modify-headers` instead."),
])
def test_check_args(arg, output):
f = io.StringIO()