Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(klassR)
  > 
  > test_check("klassR")
  Timeout was reached: [data.ssb.no] Connection timed out after 10015 milliseconds
  Timeout was reached: [data.ssb.no] Connection timed out after 10012 milliseconds
  Timeout was reached: [data.ssb.no] Connection timed out after 10008 milliseconds
  Timeout was reached: [data.ssb.no] Connection timed out after 10005 milliseconds
  Timeout was reached: [data.ssb.no] Connection timed out after 10008 milliseconds
  Timeout was reached: [data.ssb.no] Connection timed out after 10002 milliseconds
  Timeout was reached: [data.ssb.no] Connection timed out after 10002 milliseconds
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_ApplyKlass.R:4:3): ApplyKlass returns correct names for numeric codes ──
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::ApplyKlass(klassdata$kommune, klass = 131, date = "2015-01-01") test_ApplyKlass.R:4:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::GetUrl2(url)
   4.       └─httr::content(hent_klass, "text")
   5.         └─base::stopifnot(is.response(x))
  ── Error (test_ApplyKlass.R:12:3): ApplyKlass returns correct names for character codes ──
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::ApplyKlass(c("INNL", "UTL", "B_FIN"), klass = 39, date = "2019-01-01") test_ApplyKlass.R:12:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::GetUrl2(url)
   4.       └─httr::content(hent_klass, "text")
   5.         └─base::stopifnot(is.response(x))
  ── Error (test_ApplyKlass.R:20:3): ApplyKlass returns correct language ─────────
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::ApplyKlass(...) test_ApplyKlass.R:20:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::GetUrl2(url)
   4.       └─httr::content(hent_klass, "text")
   5.         └─base::stopifnot(is.response(x))
  ── Error (test_ApplyKlass.R:35:10): ApplyKlass returns correctly for character codes ──
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::ApplyKlass(sektor, 39, date = "2020-01-01") test_ApplyKlass.R:35:9
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::GetUrl2(url)
   4.       └─httr::content(hent_klass, "text")
   5.         └─base::stopifnot(is.response(x))
  ── Error (test_ApplyKlass.R:41:3): Check levelCheck for numerical codes ────────
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::GetKlass(7, date = "2020-01-01") test_ApplyKlass.R:41:2
   2.   └─klassR:::GetUrl2(url)
   3.     └─httr::content(hent_klass, "text")
   4.       └─base::stopifnot(is.response(x))
  ── Error (test_ApplyKlass.R:51:3): Check levelCheck for character codes ────────
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::GetKlass(39, date = "2020-01-01") test_ApplyKlass.R:51:2
   2.   └─klassR:::GetUrl2(url)
   3.     └─httr::content(hent_klass, "text")
   4.       └─base::stopifnot(is.response(x))
  ── Error (test_ApplyKlass.R:59:3): ApplyKlass can return a variant classification ──
  Error: is.response(x) is not TRUE
  Backtrace:
      █
   1. └─klassR::ApplyKlass(...) test_ApplyKlass.R:59:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::get_variant_name(variant)
   4.       └─httr::content(variant_url, "text")
   5.         └─base::stopifnot(is.response(x))
  
  [ FAIL 7 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted