Python: TaintTracking: Move tests of py3 string methods

This commit is contained in:
Rasmus Wriedt Larsen
2020-08-25 13:06:27 +02:00
parent cf121cc4d0
commit 2dbf83b579
4 changed files with 73 additions and 64 deletions

View File

@@ -18,6 +18,18 @@ def ensure_not_tainted(*args):
# Actual tests
def str_methods():
print("\n# str_methods")
ts = TAINTED_STRING
tb = TAINTED_BYTES
ensure_tainted(
ts.casefold(),
ts.format_map({}),
"{unsafe}".format_map({"unsafe": ts}),
)
def binary_decode_encode():
print("\n#percent_fmt")
tb = TAINTED_BYTES
@@ -47,5 +59,6 @@ def f_strings():
# Make tests runable
str_methods()
binary_decode_encode()
f_strings()