mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-06 00:02:08 -04:00
do not do brotli tests on jruby
This commit is contained in:
parent
640a78fad4
commit
3c16999b53
@ -59,24 +59,26 @@ module Requests
|
||||
assert compressed_data.bytesize < 8012, "body hasn't been compressed"
|
||||
end
|
||||
|
||||
def test_plugin_compression_brotli
|
||||
client = HTTPX.plugin(:"compression/brotli")
|
||||
response = client.get("http://httpbin.org/brotli")
|
||||
verify_status(response.status, 200)
|
||||
body = json_body(response)
|
||||
assert body["brotli"], "response should be deflated"
|
||||
end
|
||||
unless RUBY_ENGINE == "java"
|
||||
def test_plugin_compression_brotli
|
||||
client = HTTPX.plugin(:"compression/brotli")
|
||||
response = client.get("http://httpbin.org/brotli")
|
||||
verify_status(response.status, 200)
|
||||
body = json_body(response)
|
||||
assert body["brotli"], "response should be deflated"
|
||||
end
|
||||
|
||||
def test_plugin_compression_brotli_post
|
||||
client = HTTPX.plugin(:"compression/brotli")
|
||||
uri = build_uri("/post")
|
||||
response = client.headers("content-encoding" => "br")
|
||||
.post(uri, body: "a" * 8012)
|
||||
verify_status(response.status, 200)
|
||||
body = json_body(response)
|
||||
verify_header(body["headers"], "Content-Type", "application/octet-stream")
|
||||
compressed_data = body["data"]
|
||||
assert compressed_data.bytesize < 8012, "body hasn't been compressed"
|
||||
def test_plugin_compression_brotli_post
|
||||
client = HTTPX.plugin(:"compression/brotli")
|
||||
uri = build_uri("/post")
|
||||
response = client.headers("content-encoding" => "br")
|
||||
.post(uri, body: "a" * 8012)
|
||||
verify_status(response.status, 200)
|
||||
body = json_body(response)
|
||||
verify_header(body["headers"], "Content-Type", "application/octet-stream")
|
||||
compressed_data = body["data"]
|
||||
assert compressed_data.bytesize < 8012, "body hasn't been compressed"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user