Running ‘testthat.R’ [0m/24m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("httr")
  Loading required package: httr
  ── 1. Failure: NULL body gives empty data element (@test-body.r#12)  ───────────
  out$data not equal to "".
  target is NULL, current is character
  
  ── 2. Error: FALSE body doesn't send body (@test-body.r#16)  ───────────────────
  Empty reply from server
  1: round_trip(body = FALSE) at testthat/test-body.r:16
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  3: stopifnot(is.response(x))
  4: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  5: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 3. Failure: string/raw in body gives same string in data element (@test-body.
  out$data not equal to "test".
  target is NULL, current is character
  
  ── 4. Failure: string/raw in body gives same string in data element (@test-body.
  out$data not equal to "test".
  target is NULL, current is character
  
  ── 5. Failure: empty list gives empty body (@test-body.r#38)  ──────────────────
  out$data not equal to "".
  target is NULL, current is character
  
  ── 6. Failure: empty list gives empty body (@test-body.r#41)  ──────────────────
  out$data not equal to "".
  target is NULL, current is character
  
  ── 7. Failure: named list matches form results (encode = 'form') (@test-body.r#4
  out$form$a not equal to "1".
  target is NULL, current is character
  
  ── 8. Failure: named list matches form results (encode = 'form') (@test-body.r#4
  out$form$b not equal to "2".
  target is NULL, current is character
  
  ── 9. Failure: named list matches form results (encode = 'multipart') (@test-bod
  out$form$a not equal to "1".
  target is NULL, current is character
  
  ── 10. Failure: named list matches form results (encode = 'multipart') (@test-bo
  out$form$b not equal to "2".
  target is NULL, current is character
  
  ── 11. Failure: named list matches form results (encode = 'json') (@test-body.r#
  out$json$a[[1]] not equal to 1.
  target is NULL, current is numeric
  
  ── 12. Failure: named list matches form results (encode = 'json') (@test-body.r#
  out$json$b[[1]] not equal to 2.
  target is NULL, current is numeric
  
  ── 13. Failure: can do own encoding (@test-body.r#64)  ─────────────────────────
  out$json not equal to list(a = 1, b = 2).
  target is NULL, current is list
  
  ── 14. Error: NULL elements are automatically dropped (@test-body.r#68)  ───────
  Empty reply from server
  1: round_trip(body = list(x = 1, y = NULL), encode = "form") at testthat/test-body.r:68
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  3: stopifnot(is.response(x))
  4: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  5: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 15. Failure: file and form vals mixed give form and data elements (@test-body
  out$form$a not equal to "1".
  target is NULL, current is character
  
  ── 16. Error: file and form vals mixed give form and data elements (@test-body.r
  non-character argument
  1: expect_equal(strsplit(out$files$y, "\r?\n")[[1]], data) at testthat/test-body.r:78
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: strsplit(out$files$y, "\r?\n")
  
  ── 17. Error: single file matches contents on disk (@test-body.r#82)  ──────────
  Empty reply from server
  1: round_trip(body = data_path) at testthat/test-body.r:82
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  3: stopifnot(is.response(x))
  4: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  5: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 18. Failure: explicit content type overrides defaults (@test-body.r#93)  ────
  out$headers$`Content-Type` not equal to "application/json".
  target is NULL, current is character
  
  ── 19. Failure: basic authentication works (@test-config.r#9)  ─────────────────
  r$status_code not equal to 401.
  1/1 mismatches
  [1] 503 - 401 == 102
  
  ── 20. Failure: basic authentication works (@test-config.r#13)  ────────────────
  r$status_code not equal to 200.
  1/1 mismatches
  [1] 503 - 200 == 303
  
  ── 21. Error: basic authentication works (@test-config.r#16)  ──────────────────
  Empty reply from server
  1: GET(path = path, handle = h) at testthat/test-config.r:16
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  ── 22. Failure: digest authentication works (@test-config.r#25)  ───────────────
  r$status_code not equal to 401.
  1/1 mismatches
  [1] 503 - 401 == 102
  
  ── 23. Failure: digest authentication works (@test-config.r#29)  ───────────────
  r$status_code not equal to 200.
  1/1 mismatches
  [1] 503 - 200 == 303
  
  ── 24. Failure: All headers captures headers from redirects (@test-header.r#18) 
  length(r1$all_headers) not equal to 1 + 1.
  1/1 mismatches
  [1] 1 - 2 == -1
  
  ── 25. Error: All headers captures headers from redirects (@test-header.r#20)  ─
  Empty reply from server
  1: GET("http://httpbin.org/redirect/3") at testthat/test-header.r:20
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  ── 26. Failure: http_error works with urls (@test-http-error.R#4)  ─────────────
  http_error("http://httpbin.org/status/200") isn't false.
  
  ── 27. Error: oauth2.0 signing works (@test-oauth.R#13)  ───────────────────────
  Empty reply from server
  1: GET(request_url, config(token = token)) at testthat/test-oauth.R:13
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  ── 28. Failure: DELETE deletes (@test-response.r#13)  ──────────────────────────
  GET("http://httpbin.org/delete")$status_code not equal to 405.
  1/1 mismatches
  [1] 503 - 405 == 98
  
  ── 29. Failure: DELETE deletes (@test-response.r#14)  ──────────────────────────
  DELETE("http://httpbin.org/delete")$status_code not equal to 200.
  1/1 mismatches
  [1] 503 - 200 == 303
  
  ── 30. Failure: POST posts (@test-response.r#18)  ──────────────────────────────
  GET("http://httpbin.org/post")$status_code not equal to 405.
  1/1 mismatches
  [1] 503 - 405 == 98
  
  ── 31. Failure: POST posts (@test-response.r#19)  ──────────────────────────────
  POST("http://httpbin.org/post")$status_code not equal to 200.
  1/1 mismatches
  [1] 503 - 200 == 303
  
  ── 32. Failure: PATCH patches (@test-response.r#23)  ───────────────────────────
  GET("http://httpbin.org/patch")$status_code not equal to 405.
  1/1 mismatches
  [1] 503 - 405 == 98
  
  ── 33. Failure: PATCH patches (@test-response.r#24)  ───────────────────────────
  PATCH("http://httpbin.org/patch")$status_code not equal to 200.
  1/1 mismatches
  [1] 503 - 200 == 303
  
  ── 34. Failure: PUT puts (@test-response.r#28)  ────────────────────────────────
  GET("http://httpbin.org/put")$status_code not equal to 405.
  1/1 mismatches
  [1] 503 - 405 == 98
  
  ── 35. Failure: PUT puts (@test-response.r#29)  ────────────────────────────────
  PUT("http://httpbin.org/put")$status_code not equal to 200.
  1/1 mismatches
  [1] 503 - 200 == 303
  
  ── 36. Error: headers returned as expected (@test-response.r#40)  ──────────────
  attempt to set an attribute on NULL
  1: expect_equal(round_trip(a = 1)$a, "1") at testthat/test-response.r:40
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: round_trip(a = 1)
  
  ── 37. Error: application/json responses parsed as lists (@test-response.r#55)  
  Empty reply from server
  1: test_user_agent() at testthat/test-response.r:55
  2: GET("http://httpbin.org/user-agent", add_headers(`user-agent` = user_agent)) at testthat/test-response.r:47
  3: request_perform(req, hu$handle$handle)
  4: request_fetch(req$output, req$url, handle)
  5: request_fetch.write_memory(req$output, req$url, handle)
  6: curl::curl_fetch_memory(url, handle = handle)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 93 SKIPPED: 2 FAILED: 37
  1. Failure: NULL body gives empty data element (@test-body.r#12) 
  2. Error: FALSE body doesn't send body (@test-body.r#16) 
  3. Failure: string/raw in body gives same string in data element (@test-body.r#22) 
  4. Failure: string/raw in body gives same string in data element (@test-body.r#25) 
  5. Failure: empty list gives empty body (@test-body.r#38) 
  6. Failure: empty list gives empty body (@test-body.r#41) 
  7. Failure: named list matches form results (encode = 'form') (@test-body.r#46) 
  8. Failure: named list matches form results (encode = 'form') (@test-body.r#47) 
  9. Failure: named list matches form results (encode = 'multipart') (@test-body.r#52) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted