|
|
@ -1,6 +1,7 @@
|
|
|
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from openapi_spec_validator import validate_spec
|
|
|
|
from openapi_spec_validator import validate_spec
|
|
|
|
from mitmproxy2swagger.testing_util import get_nested_key, mitmproxy2swagger_e2e_test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from mitmproxy2swagger.testing_util import mitmproxy2swagger_e2e_test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_mitmproxy2swagger_compliance_from_mitmproxy_flow_file():
|
|
|
|
def test_mitmproxy2swagger_compliance_from_mitmproxy_flow_file():
|
|
|
@ -15,6 +16,7 @@ def test_mitmproxy2swagger_compliance_from_mitmproxy_flow_file():
|
|
|
|
assert data is not None
|
|
|
|
assert data is not None
|
|
|
|
validate_spec(data)
|
|
|
|
validate_spec(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_mitmproxy2swagger_compliance_from_mitmproxy_flow_file_with_headers():
|
|
|
|
def test_mitmproxy2swagger_compliance_from_mitmproxy_flow_file_with_headers():
|
|
|
|
data = mitmproxy2swagger_e2e_test(
|
|
|
|
data = mitmproxy2swagger_e2e_test(
|
|
|
|
"testdata/test_flows",
|
|
|
|
"testdata/test_flows",
|
|
|
@ -28,6 +30,7 @@ def test_mitmproxy2swagger_compliance_from_mitmproxy_flow_file_with_headers():
|
|
|
|
assert data is not None
|
|
|
|
assert data is not None
|
|
|
|
validate_spec(data)
|
|
|
|
validate_spec(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_mitmproxy2swagger_compliance_from_har_file_with_headers():
|
|
|
|
def test_mitmproxy2swagger_compliance_from_har_file_with_headers():
|
|
|
|
data = mitmproxy2swagger_e2e_test(
|
|
|
|
data = mitmproxy2swagger_e2e_test(
|
|
|
|
"testdata/sklep.lisek.app.har",
|
|
|
|
"testdata/sklep.lisek.app.har",
|
|
|
@ -41,6 +44,7 @@ def test_mitmproxy2swagger_compliance_from_har_file_with_headers():
|
|
|
|
assert data is not None
|
|
|
|
assert data is not None
|
|
|
|
validate_spec(data)
|
|
|
|
validate_spec(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_mitmproxy2swagger_compliance_from_form_data_file_with_headers():
|
|
|
|
def test_mitmproxy2swagger_compliance_from_form_data_file_with_headers():
|
|
|
|
data = mitmproxy2swagger_e2e_test(
|
|
|
|
data = mitmproxy2swagger_e2e_test(
|
|
|
|
"testdata/form_data_flows",
|
|
|
|
"testdata/form_data_flows",
|
|
|
|