def test_response_from_dict_gzip():
    result = MITMResponse.from_dict(TEST_DICT_RESPONSE_GZIP)
    expected = TEST_RESPONSE_GZIP

    assert result == expected
def test_dict_responses_from_bytes_and_str_equal():
    result_from_string = MITMResponse.from_dict(TEST_DICT_RESPONSE)
    result_from_bytes = MITMResponse.from_dict(
        TEST_DICT_RESPONSE_WITH_BYTES_BODY)

    assert result_from_string == result_from_bytes
def test_response_from_dict():
    result = MITMResponse.from_dict(TEST_DICT_RESPONSE)
    expected = TEST_RESPONSE

    assert result == expected