aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/coretypes/test_basethread.py2
-rw-r--r--test/mitmproxy/net/http/test_cookies.py4
-rw-r--r--test/mitmproxy/net/test_tcp.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/mitmproxy/coretypes/test_basethread.py b/test/mitmproxy/coretypes/test_basethread.py
index 4a383fea..6b0ae154 100644
--- a/test/mitmproxy/coretypes/test_basethread.py
+++ b/test/mitmproxy/coretypes/test_basethread.py
@@ -4,4 +4,4 @@ from mitmproxy.coretypes import basethread
def test_basethread():
t = basethread.BaseThread('foobar')
- assert re.match('foobar - age: \d+s', t._threadinfo())
+ assert re.match(r'foobar - age: \d+s', t._threadinfo())
diff --git a/test/mitmproxy/net/http/test_cookies.py b/test/mitmproxy/net/http/test_cookies.py
index 74233cca..06cfe1d3 100644
--- a/test/mitmproxy/net/http/test_cookies.py
+++ b/test/mitmproxy/net/http/test_cookies.py
@@ -27,7 +27,7 @@ cookie_pairs = [
[["one", "uno"], ["two", "due"]]
],
[
- 'one="uno"; two="\due"',
+ 'one="uno"; two="\\due"',
[["one", "uno"], ["two", "due"]]
],
[
@@ -70,7 +70,7 @@ def test_read_key():
def test_read_quoted_string():
tokens = [
[('"foo" x', 0), ("foo", 5)],
- [('"f\oo" x', 0), ("foo", 6)],
+ [('"f\\oo" x', 0), ("foo", 6)],
[(r'"f\\o" x', 0), (r"f\o", 6)],
[(r'"f\\" x', 0), (r"f" + '\\', 5)],
[('"fo\\\"" x', 0), ("fo\"", 6)],
diff --git a/test/mitmproxy/net/test_tcp.py b/test/mitmproxy/net/test_tcp.py
index b6bb7cc1..22a306dc 100644
--- a/test/mitmproxy/net/test_tcp.py
+++ b/test/mitmproxy/net/test_tcp.py
@@ -102,7 +102,7 @@ class TestServerBind(tservers.ServerTestBase):
# We may get an ipv4-mapped ipv6 address here, e.g. ::ffff:127.0.0.1.
# Those still appear as "127.0.0.1" in the table, so we need to strip the prefix.
peername = self.connection.getpeername()
- address = re.sub("^::ffff:(?=\d+.\d+.\d+.\d+$)", "", peername[0])
+ address = re.sub(r"^::ffff:(?=\d+.\d+.\d+.\d+$)", "", peername[0])
port = peername[1]
self.wfile.write(str((address, port)).encode())