@@ -12,4 +12,7 @@ def test_view_urlencoded():
     d = url.encode([("adsfa", "")]).encode()
     assert v(d)
 
+    d = url.encode([]).encode()
+    assert v(d)
+
     assert not v(b"\xFF\x00")
from mitmproxy.contentviews import urlencoded
from mitmproxy.net.http import url
from . import full_eval


def test_view_urlencoded():
    v = full_eval(urlencoded.ViewURLEncoded())

    d = url.encode([("one", "two"), ("three", "four")]).encode()
    assert v(d)

    d = url.encode([("adsfa", "")]).encode()
    assert v(d)

    assert not v(b"\xFF\x00")

I think it would be much more useful to write a test that directly invokes `base.format_dict` in contentviews/test_base.py  