tests/testthat/test-call_api.R

context("Rate limit")

test_that("Call API", {
  expect_identical(status_code(mock_method()), 200L)
  expect_identical(status_code(mock_method()), 429L)
  expect_identical(status_code(call_api(mock_method, list())), 200L)
  expect_identical(status_code(mock_method()), 429L)
})

Try the openrouteservice package in your browser

Any scripts or data that you put into this service are public.

openrouteservice documentation built on Oct. 21, 2024, 9:06 a.m.