aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-03-16 12:34:01 +0100
committerGitHub <noreply@github.com>2017-03-16 12:34:01 +0100
commit6c0bbcc9eeb9923b81112dd6bae07f4f2637fe35 (patch)
treec1aa8daed8361948ca97e336accf4b6cfea71b22
parent4a354ffb83ae7bdb36fe47799d89b159f612160b (diff)
parentb3525570929ba47c10d9d08696876c39487f7000 (diff)
downloadmitmproxy-6c0bbcc9eeb9923b81112dd6bae07f4f2637fe35.tar.gz
mitmproxy-6c0bbcc9eeb9923b81112dd6bae07f4f2637fe35.tar.bz2
mitmproxy-6c0bbcc9eeb9923b81112dd6bae07f4f2637fe35.zip
Merge pull request #2170 from felixonmars/patch-1
Fix test_format_xml with dot in path
-rw-r--r--test/mitmproxy/contentviews/test_xml_html.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/mitmproxy/contentviews/test_xml_html.py b/test/mitmproxy/contentviews/test_xml_html.py
index 899ecfde..2b0aee4d 100644
--- a/test/mitmproxy/contentviews/test_xml_html.py
+++ b/test/mitmproxy/contentviews/test_xml_html.py
@@ -23,7 +23,7 @@ def test_format_xml(filename):
path = data.path(filename)
with open(path) as f:
input = f.read()
- with open(path.replace(".", "-formatted.")) as f:
+ with open("-formatted.".join(path.rsplit(".", 1))) as f:
expected = f.read()
tokens = xml_html.tokenize(input)
assert xml_html.format_xml(tokens) == expected