tests/testthat/test-GetDeepSearchResults.R

context('GetDeepSearchResults')

test_that("'getURL' errors are handled gracefully", {
    set_zillow_web_service_id('ZWSID')

    with_mock(
        getURL = function(...) {stop('Cryptic getURL error')},
        expect_error(GetDeepSearchResults(address = '2114 Bigelow Ave', citystatezip = 'Seattle, WA'), "Zillow API call with request '.+' failed with Error in RCurl::getURL\\(request\\): Cryptic getURL error"),
        .env = 'RCurl'
    )
})

Try the ZillowR package in your browser

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

ZillowR documentation built on May 5, 2022, 9:06 a.m.