aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_flow.py1
-rw-r--r--test/mitmproxy/test_utils_lrucache.py34
2 files changed, 0 insertions, 35 deletions
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py
index d16bb6dd..ed15a766 100644
--- a/test/mitmproxy/test_flow.py
+++ b/test/mitmproxy/test_flow.py
@@ -104,7 +104,6 @@ class TestHTTPFlow:
assert f.killable
f.kill(fm)
assert not f.killable
- assert fm.error.called
assert f.reply.value == Kill
def test_killall(self):
diff --git a/test/mitmproxy/test_utils_lrucache.py b/test/mitmproxy/test_utils_lrucache.py
deleted file mode 100644
index 07b96b4d..00000000
--- a/test/mitmproxy/test_utils_lrucache.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from mitmproxy.utils import lrucache
-
-
-def test_LRUCache():
- cache = lrucache.LRUCache(2)
-
- class Foo:
- ran = False
-
- def gen(self, x):
- self.ran = True
- return x
- f = Foo()
-
- assert not f.ran
- assert cache.get(f.gen, 1) == 1
- assert f.ran
- f.ran = False
- assert cache.get(f.gen, 1) == 1
- assert not f.ran
-
- f.ran = False
- assert cache.get(f.gen, 1) == 1
- assert not f.ran
- assert cache.get(f.gen, 2) == 2
- assert cache.get(f.gen, 3) == 3
- assert f.ran
-
- f.ran = False
- assert cache.get(f.gen, 1) == 1
- assert f.ran
-
- assert len(cache.cacheList) == 2
- assert len(cache.cache) == 2