def test(): data = load_acceptance_test(__file__) actual = PactRequest(**data['actual']) expected = PactRequest(**data['expected']) actual.headers = [{'Content-Type': 'text/plain'}] expected.headers = [{'Content-Type': 'text/plain'}] test_result = match(actual, expected) assert type(test_result) is Right
def test_custom_headers(): headers = [('Content-Type', 'text')] r = PactRequest(headers=headers) assert r.headers == headers headers = [('Content-Type', 'application/json')] r.headers = headers assert r.headers == headers