blob: c94d8be2a0c5fd14446ee73ee799aa2c4176560f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import pytest
from mitmproxy.contentviews import base
def test_format_dict():
d = {"one": "two", "three": "four"}
f_d = base.format_dict(d)
assert next(f_d)
d = {"adsfa": ""}
f_d = base.format_dict(d)
assert next(f_d)
d = {}
f_d = base.format_dict(d)
with pytest.raises(StopIteration):
next(f_d)
|