@@ -95,52 +95,52 @@ test_that("get_pet_by_id", {
9595 )
9696})
9797
98- test_that(" update_pet_with_form" , {
99- # # add pet
100- update_pet_id <- 123999
101- update_pet <- Pet $ new(" name_test" ,
102- photoUrls = list (" photo_test" , " second test" ),
103- category = Category $ new(id = 450 , name = " test_cat" ),
104- id = update_pet_id ,
105- tags = list (
106- Tag $ new(id = 123 , name = " tag_test" ), Tag $ new(id = 456 , name = " unknown" )
107- ),
108- status = " available"
109- )
110- pet_api $ api_client $ username <- " username123"
111- pet_api $ api_client $ password <- " password123"
112- result <- pet_api $ add_pet(update_pet )
113-
114- # # update pet with form
115- pet_api $ api_client $ oauth_client_id <- " client_id_aaa"
116- pet_api $ api_client $ oauth_secret <- " secrete_bbb"
117- pet_api $ api_client $ oauth_scopes <- " write:pets read:pets"
118- update_result <- pet_api $ update_pet_with_form(update_pet_id , name = " pet2" , status = " sold" )
119-
120- # get pet
121- response <- pet_api $ get_pet_by_id(update_pet_id )
122- expect_equal(response $ id , update_pet_id )
123- expect_equal(response $ name , " pet2" )
124- expect_equal(response $ status , " sold" )
125- expect_equal(
126- response $ photoUrls ,
127- list (" photo_test" , " second test" )
128- )
129- expect_equal(response $ category , Category $ new(id = 450 , name = " test_cat" ))
130-
131- expect_equal(pet $ tags , response $ tags )
132- expect_equal(
133- response $ tags ,
134- list (Tag $ new(id = 123 , name = " tag_test" ), Tag $ new(id = 456 , name = " unknown" ))
135- )
136- })
137-
138- test_that(" get_pet_by_id_streaming" , {
139- result <- tryCatch(
140- pet_api $ get_pet_by_id_streaming(pet_id , stream_callback = function (x ) { print(x ) }),
141- ApiException = function (ex ) ex
142- )
143- })
98+ # test_that("update_pet_with_form", {
99+ # ## add pet
100+ # update_pet_id <- 123999
101+ # update_pet <- Pet$new("name_test",
102+ # photoUrls = list("photo_test", "second test"),
103+ # category = Category$new(id = 450, name = "test_cat"),
104+ # id = update_pet_id,
105+ # tags = list(
106+ # Tag$new(id = 123, name = "tag_test"), Tag$new(id = 456, name = "unknown")
107+ # ),
108+ # status = "available"
109+ # )
110+ # pet_api$api_client$username <- "username123"
111+ # pet_api$api_client$password <- "password123"
112+ # result <- pet_api$add_pet(update_pet)
113+ #
114+ # ## update pet with form
115+ # pet_api$api_client$oauth_client_id <- "client_id_aaa"
116+ # pet_api$api_client$oauth_secret <- "secrete_bbb"
117+ # pet_api$api_client$oauth_scopes <- "write:pets read:pets"
118+ # update_result <- pet_api$update_pet_with_form(update_pet_id, name = "pet2", status = "sold")
119+ #
120+ # # get pet
121+ # response <- pet_api$get_pet_by_id(update_pet_id)
122+ # expect_equal(response$id, update_pet_id)
123+ # expect_equal(response$name, "pet2")
124+ # expect_equal(response$status, "sold")
125+ # expect_equal(
126+ # response$photoUrls,
127+ # list("photo_test", "second test")
128+ # )
129+ # expect_equal(response$category, Category$new(id = 450, name = "test_cat"))
130+ #
131+ # expect_equal(pet$tags, response$tags)
132+ # expect_equal(
133+ # response$tags,
134+ # list(Tag$new(id = 123, name = "tag_test"), Tag$new(id = 456, name = "unknown"))
135+ # )
136+ # })
137+ #
138+ # test_that("get_pet_by_id_streaming", {
139+ # result <- tryCatch(
140+ # pet_api$get_pet_by_id_streaming(pet_id, stream_callback = function(x) { print(x) }),
141+ # ApiException = function(ex) ex
142+ # )
143+ # })
144144
145145test_that(" Test header parameters" , {
146146 # test exception
0 commit comments