@@ -141,12 +141,25 @@ test_that("basic_epidata_call", {
141141 time_values = epirange(201501 , 202001 ),
142142 fetch_args = fetch_args_list(dry_run = TRUE )
143143 ) %> % request_url())
144+ expect_no_error(pvt_twitter(
145+ auth = " yourkey" ,
146+ locations = " CA" ,
147+ time_type = " day" ,
148+ time_values = epirange(20150101 , 20200101 ),
149+ fetch_args = fetch_args_list(dry_run = TRUE )
150+ ) %> % request_url())
144151 expect_no_error(pub_wiki(
145152 articles = " avian_influenza" ,
146153 time_type = " week" ,
147154 time_values = epirange(201501 , 202001 ),
148155 fetch_args = fetch_args_list(dry_run = TRUE )
149156 ) %> % request_url())
157+ expect_no_error(pub_wiki(
158+ articles = " avian_influenza" ,
159+ time_type = " day" ,
160+ time_values = epirange(20150101 , 20200101 ),
161+ fetch_args = fetch_args_list(dry_run = TRUE )
162+ ) %> % request_url())
150163})
151164
152165test_that(" endoints accept wildcard for date parameter" , {
@@ -324,6 +337,44 @@ test_that("endoints accept wildcard for date parameter", {
324337 ))
325338 expect_identical(call $ params $ epiweeks $ from , 100001 )
326339 expect_identical(call $ params $ epiweeks $ to , 300001 )
340+
341+ expect_no_error(call <- pvt_twitter(
342+ auth = " yourkey" ,
343+ locations = " CA" ,
344+ time_type = " week" ,
345+ time_values = " *" ,
346+ fetch_args = fetch_args_list(dry_run = TRUE )
347+ ))
348+ expect_identical(call $ params $ epiweeks $ from , 100001 )
349+ expect_identical(call $ params $ epiweeks $ to , 300001 )
350+
351+ expect_no_error(call <- pvt_twitter(
352+ auth = " yourkey" ,
353+ locations = " CA" ,
354+ time_type = " day" ,
355+ time_values = " *" ,
356+ fetch_args = fetch_args_list(dry_run = TRUE )
357+ ))
358+ expect_identical(call $ params $ dates $ from , 10000101 )
359+ expect_identical(call $ params $ dates $ to , 30000101 )
360+
361+ expect_no_error(call <- pub_wiki(
362+ articles = " avian_influenza" ,
363+ time_type = " week" ,
364+ time_values = " *" ,
365+ fetch_args = fetch_args_list(dry_run = TRUE )
366+ ))
367+ expect_identical(call $ params $ epiweeks $ from , 100001 )
368+ expect_identical(call $ params $ epiweeks $ to , 300001 )
369+
370+ expect_no_error(call <- pub_wiki(
371+ articles = " avian_influenza" ,
372+ time_type = " day" ,
373+ time_values = " *" ,
374+ fetch_args = fetch_args_list(dry_run = TRUE )
375+ ))
376+ expect_identical(call $ params $ dates $ from , 10000101 )
377+ expect_identical(call $ params $ dates $ to , 30000101 )
327378})
328379
329380test_that(" endpoints fail when given args via dots" , {
0 commit comments