@@ -7,6 +7,7 @@ endpoints <- get_endpoints()
7
7
8
8
test_that(" API returns expected df names for all endpoints" , {
9
9
skip_on_cran()
10
+ skip_on_ci()
10
11
11
12
broken_endpoints <- c(
12
13
" cpc_subclass" ,
@@ -36,6 +37,7 @@ test_that("API returns expected df names for all endpoints", {
36
37
37
38
test_that(" DSL-based query returns expected results" , {
38
39
skip_on_cran()
40
+ skip_on_ci()
39
41
40
42
query <- with_qfuns(
41
43
and(
@@ -52,6 +54,7 @@ test_that("DSL-based query returns expected results", {
52
54
53
55
test_that(" You can download up to 9,000+ records" , {
54
56
skip_on_cran()
57
+ skip_on_ci()
55
58
56
59
# Should return 9,000+ rows
57
60
query <- with_qfuns(
@@ -66,6 +69,7 @@ test_that("You can download up to 9,000+ records", {
66
69
67
70
test_that(" search_pv can pull all fields for all endpoints" , {
68
71
skip_on_cran()
72
+ skip_on_ci()
69
73
70
74
troubled_endpoints <- c(
71
75
" cpc_subclass" , " location" ,
@@ -87,6 +91,7 @@ test_that("search_pv can pull all fields for all endpoints", {
87
91
88
92
test_that(" Sort option works as expected" , {
89
93
skip_on_cran()
94
+ skip_on_ci()
90
95
91
96
out <- search_pv(
92
97
qry_funs $ neq(assignee_id = " " ),
@@ -101,6 +106,7 @@ test_that("Sort option works as expected", {
101
106
102
107
test_that(" search_pv properly URL encodes queries" , {
103
108
skip_on_cran()
109
+ skip_on_ci()
104
110
105
111
# Covers https://github.com/ropensci/patentsview/issues/24
106
112
# need to use the assignee endpoint now
@@ -129,6 +135,7 @@ test_that("search_pv properly URL encodes queries", {
129
135
130
136
test_that(" We won't expose the user's patentsview API key to random websites" , {
131
137
skip_on_cran()
138
+ skip_on_ci()
132
139
133
140
# We will try to call the api that tells us who is currently in space
134
141
in_space_now_url <- " http://api.open-notify.org/astros.json"
@@ -138,6 +145,7 @@ test_that("We won't expose the user's patentsview API key to random websites", {
138
145
139
146
test_that(" We can call all the legitimate HATEOAS endpoints" , {
140
147
skip_on_cran()
148
+ skip_on_ci()
141
149
142
150
single_item_queries <- c(
143
151
" cpc_subclass/A01B/" ,
@@ -207,6 +215,7 @@ test_that("We can call all the legitimate HATEOAS endpoints", {
207
215
208
216
test_that(" posts and gets return the same data" , {
209
217
skip_on_cran()
218
+ skip_on_ci()
210
219
211
220
bad_eps <- c(
212
221
" cpc_subclass"
@@ -247,6 +256,7 @@ test_that("posts and gets return the same data", {
247
256
248
257
test_that(" nested shorthand produces the same results as fully qualified ones" , {
249
258
skip_on_cran()
259
+ skip_on_ci()
250
260
251
261
# the API now allows a shorthand in the fields/f: parameter
252
262
# just the group name will retrieve all that group's attributes
@@ -264,6 +274,7 @@ test_that("nested shorthand produces the same results as fully qualified ones",
264
274
265
275
test_that(" the 'after' parameter works properly" , {
266
276
skip_on_cran()
277
+ skip_on_ci()
267
278
268
279
sort <- c(" patent_id" = " asc" )
269
280
big_query <- qry_funs $ eq(patent_date = " 2000-01-04" ) # 3003 total_hits
@@ -300,6 +311,7 @@ test_that("the 'after' parameter works properly", {
300
311
301
312
test_that(" the documentation and Swagger UI URLs work properly" , {
302
313
skip_on_cran()
314
+ skip_on_ci()
303
315
304
316
documentation_url <-
305
317
' https://search.patentsview.org/api/v1/patent/?q={"_text_any":{"patent_title":"COBOL cotton gin"}}&s=[{"patent_id": "asc" }]&o={"size":50}&f=["inventors.inventor_name_last","patent_id","patent_date","patent_title"]'
@@ -316,6 +328,7 @@ test_that("the documentation and Swagger UI URLs work properly", {
316
328
317
329
test_that(" an error occurs if all_pages is TRUE and there aren't any results" , {
318
330
skip_on_cran()
331
+ skip_on_ci()
319
332
320
333
too_early <- qry_funs $ lt(patent_date = " 1976-01-01" )
321
334
@@ -332,6 +345,7 @@ test_that("an error occurs if all_pages is TRUE and there aren't any results", {
332
345
333
346
test_that(" we can retrieve all_pages = TRUE without specifiying fields" , {
334
347
skip_on_cran()
348
+ skip_on_ci()
335
349
336
350
query <- qry_funs $ eq(patent_date = " 1976-01-06" )
337
351
sort <- c(" patent_type" = " asc" , " patent_id" = " asc" )
@@ -348,6 +362,7 @@ test_that("we can retrieve all_pages = TRUE without specifiying fields", {
348
362
# the two responses match, then we've correctly handled throttling errors.
349
363
test_that(" Throttled requests are automatically retried" , {
350
364
skip_on_cran()
365
+ skip_on_ci()
351
366
352
367
res <- search_pv(' {"_gte":{"patent_date":"2007-01-04"}}' , size = 50 )
353
368
patent_ids <- res $ data $ patents $ patent_id
@@ -421,6 +436,7 @@ test_that("Throttled requests are automatically retried", {
421
436
422
437
test_that(" we can sort on an unrequested field across page boundaries" , {
423
438
skip_on_cran()
439
+ skip_on_ci()
424
440
425
441
# total_hits = 5,352
426
442
query <- qry_funs $ in_range(patent_date = c(" 1976-01-01" , " 1976-01-31" ))
@@ -451,6 +467,7 @@ test_that("we can sort on an unrequested field across page boundaries", {
451
467
452
468
test_that(" sort works across page boundaries" , {
453
469
skip_on_cran()
470
+ skip_on_ci()
454
471
455
472
sort <- c(" patent_type" = " desc" , " patent_id" = " desc" )
456
473
results <- search_pv(
0 commit comments