@@ -170,52 +170,52 @@ test_that("get_pet_by_id via wrapper", {
170170 )
171171})
172172
173- test_that(" update_pet_with_form" , {
174- # # add pet
175- update_pet_id <- 123999
176- update_pet <- Pet $ new(" name_test" ,
177- photoUrls = list (" photo_test" , " second test" ),
178- category = Category $ new(id = 450 , name = " test_cat" ),
179- id = update_pet_id ,
180- tags = list (
181- Tag $ new(id = 123 , name = " tag_test" ), Tag $ new(id = 456 , name = " unknown" )
182- ),
183- status = " available"
184- )
185- pet_api $ api_client $ username <- " username123"
186- pet_api $ api_client $ password <- " password123"
187- result <- pet_api $ add_pet(update_pet )
188-
189- # # update pet with form
190- pet_api $ api_client $ oauth_client_id <- " client_id_aaa"
191- pet_api $ api_client $ oauth_secret <- " secrete_bbb"
192- pet_api $ api_client $ oauth_scopes <- " write:pets read:pets"
193- update_result <- pet_api $ update_pet_with_form(update_pet_id , name = " pet2" , status = " sold" )
194-
195- # get pet
196- response <- pet_api $ get_pet_by_id(update_pet_id )
197- expect_equal(response $ id , update_pet_id )
198- expect_equal(response $ name , " pet2" )
199- expect_equal(response $ status , " sold" )
200- expect_equal(
201- response $ photoUrls ,
202- list (" photo_test" , " second test" )
203- )
204- expect_equal(response $ category , Category $ new(id = 450 , name = " test_cat" ))
205-
206- expect_equal(pet $ tags , response $ tags )
207- expect_equal(
208- response $ tags ,
209- list (Tag $ new(id = 123 , name = " tag_test" ), Tag $ new(id = 456 , name = " unknown" ))
210- )
211- })
212-
213- test_that(" get_pet_by_id_streaming" , {
214- result <- tryCatch(
215- pet_api $ get_pet_by_id_streaming(pet_id , stream_callback = function (x ) { print(x ) }),
216- ApiException = function (ex ) ex
217- )
218- })
173+ # test_that("update_pet_with_form", {
174+ # ## add pet
175+ # update_pet_id <- 123999
176+ # update_pet <- Pet$new("name_test",
177+ # photoUrls = list("photo_test", "second test"),
178+ # category = Category$new(id = 450, name = "test_cat"),
179+ # id = update_pet_id,
180+ # tags = list(
181+ # Tag$new(id = 123, name = "tag_test"), Tag$new(id = 456, name = "unknown")
182+ # ),
183+ # status = "available"
184+ # )
185+ # pet_api$api_client$username <- "username123"
186+ # pet_api$api_client$password <- "password123"
187+ # result <- pet_api$add_pet(update_pet)
188+ #
189+ # ## update pet with form
190+ # pet_api$api_client$oauth_client_id <- "client_id_aaa"
191+ # pet_api$api_client$oauth_secret <- "secrete_bbb"
192+ # pet_api$api_client$oauth_scopes <- "write:pets read:pets"
193+ # update_result <- pet_api$update_pet_with_form(update_pet_id, name = "pet2", status = "sold")
194+ #
195+ # # get pet
196+ # response <- pet_api$get_pet_by_id(update_pet_id)
197+ # expect_equal(response$id, update_pet_id)
198+ # expect_equal(response$name, "pet2")
199+ # expect_equal(response$status, "sold")
200+ # expect_equal(
201+ # response$photoUrls,
202+ # list("photo_test", "second test")
203+ # )
204+ # expect_equal(response$category, Category$new(id = 450, name = "test_cat"))
205+ #
206+ # expect_equal(pet$tags, response$tags)
207+ # expect_equal(
208+ # response$tags,
209+ # list(Tag$new(id = 123, name = "tag_test"), Tag$new(id = 456, name = "unknown"))
210+ # )
211+ # })
212+ #
213+ # test_that("get_pet_by_id_streaming", {
214+ # result <- tryCatch(
215+ # pet_api$get_pet_by_id_streaming(pet_id, stream_callback = function(x) { print(x) }),
216+ # ApiException = function(ex) ex
217+ # )
218+ # })
219219
220220test_that(" Test header parameters" , {
221221 # test exception
@@ -327,34 +327,34 @@ test_that("find_pets_by_status", {
327327 expect_equal(result $ ApiException $ reason , " Invalid value for `status` when calling PetApi$find_pets_by_status. Must be [available, pending, sold]." )
328328})
329329
330- test_that(" find_pets_by_tags" , {
331- pet_tag_test <- Pet $ new(" name_test" ,
332- photoUrls = list (" photo_test" , " second test" ),
333- category = Category $ new(id = 4455 , name = " test_cat" ),
334- id = 4455 ,
335- tags = list (
336- Tag $ new(id = 4455 , name = " tag_test" ), Tag $ new(id = 488 , name = " unknown 2" )
337- ),
338- status = " available"
339- )
340- result <- pet_api $ add_pet(pet_tag_test )
341-
342- # vector as input
343- var_tags <- c(" unknown" , " unknown 2" ) # array[character] | Tags to filter by
344- result <- pet_api $ find_pets_by_tags(var_tags )
345- expect_true(! is.null(result ))
346- expect_equal(result [[1 ]]$ id , 123321 )
347- expect_equal(result [[2 ]]$ id , 123999 )
348- expect_equal(result [[3 ]]$ id , 4455 )
349-
350- # list as input
351- var_tags <- list (" unknown" , " unknown 2" ) # array[character] | Tags to filter by
352- result <- pet_api $ find_pets_by_tags(var_tags )
353- expect_true(! is.null(result ))
354- expect_equal(result [[1 ]]$ id , 123321 )
355- expect_equal(result [[2 ]]$ id , 123999 )
356- expect_equal(result [[3 ]]$ id , 4455 )
357- })
330+ # test_that("find_pets_by_tags", {
331+ # pet_tag_test <- Pet$new("name_test",
332+ # photoUrls = list("photo_test", "second test"),
333+ # category = Category$new(id = 4455, name = "test_cat"),
334+ # id = 4455,
335+ # tags = list(
336+ # Tag$new(id = 4455, name = "tag_test"), Tag$new(id = 488, name = "unknown 2")
337+ # ),
338+ # status = "available"
339+ # )
340+ # result <- pet_api$add_pet(pet_tag_test)
341+ #
342+ # # vector as input
343+ # var_tags <- c("unknown", "unknown 2") # array[character] | Tags to filter by
344+ # result <- pet_api$find_pets_by_tags(var_tags)
345+ # expect_true(!is.null(result))
346+ # expect_equal(result[[1]]$id, 123321)
347+ # expect_equal(result[[2]]$id, 123999)
348+ # expect_equal(result[[3]]$id, 4455)
349+ #
350+ # # list as input
351+ # var_tags <- list("unknown", "unknown 2") # array[character] | Tags to filter by
352+ # result <- pet_api$find_pets_by_tags(var_tags)
353+ # expect_true(!is.null(result))
354+ # expect_equal(result[[1]]$id, 123321)
355+ # expect_equal(result[[2]]$id, 123999)
356+ # expect_equal(result[[3]]$id, 4455)
357+ # })
358358
359359test_that(" Tests allOf" , {
360360 # test allOf without discriminator
0 commit comments