blob: 1224b8db261035262e2241aa686f4bfd5da4039a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from mitmproxy.contentviews import protobuf
from mitmproxy.test import tutils
from . import full_eval
if protobuf.ViewProtobuf.is_available():
def test_view_protobuf_request():
v = full_eval(protobuf.ViewProtobuf())
p = tutils.test_data.path("mitmproxy/data/protobuf01")
content_type, output = v(open(p, "rb").read())
assert content_type == "Protobuf"
assert output.next()[0][1] == '1: "3bbc333c-e61c-433b-819a-0b9a8cc103b8"'
|