-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated service endpoint mock_dir with valid data
- Loading branch information
1 parent
ed69e72
commit 0a9c660
Showing
2 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
16 changes: 10 additions & 6 deletions
16
tests/testthat/services/comtradeapi.un.org/data/v1/get/S/A/EB-051bfe.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
structure(list(method = "GET", url = "https://comtradeapi.un.org/data/v1/get/S/A/EB?cmdCode=200&flowCode=M%2CX%2CRM%2CRX&partnerCode=32%2C280%2C276&reporterCode=156&period=2010&motCode=0&partner2Code=0&customsCode=C00&includeDesc=TRUE", # nolint start | ||
status_code = 401L, headers = structure(list(`Content-Length` = "143", | ||
`Content-Type` = "application/json", `Request-Context` = "appId=cid-v1:9b6e1d5a-3728-46ff-b743-6d33d23e54a6", | ||
`WWW-Authenticate` = "AzureApiManagementKey realm=\"https://comtradeapi.un.org/data\",name=\"Ocp-Apim-Subscription-Key\",type=\"header\"", | ||
Date = "Fri, 01 Sep 2023 17:43:39 GMT"), class = "httr2_headers"), | ||
body = charToRaw("{ \"statusCode\": 401, \"message\": \"Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.\" }")), class = "httr2_response") # nolint end | ||
structure(list(method = "GET", url = "https://comtradeapi.un.org/data/v1/get/S/A/EB?cmdCode=200&flowCode=M%2CX%2CRM%2CRX&partnerCode=32%2C280%2C276&reporterCode=156&period=2010&motCode=0&partner2Code=0&customsCode=C00&includeDesc=TRUE", | ||
status_code = 200L, headers = structure(list(`Transfer-Encoding` = "chunked", | ||
`Content-Type` = "application/json; charset=utf-8", `Content-Encoding` = "gzip", | ||
Vary = "Accept-Encoding", `Request-Context` = "appId=cid-v1:9b6e1d5a-3728-46ff-b743-6d33d23e54a6", | ||
`x-frame-options` = "deny", `X-Content-Type-Options` = "nosniff", | ||
`X-XSS-Protection` = "1;mode=block", `strict-transport-security` = "max-age=31536000;includeSubDomains", | ||
`content-security-policy` = "frame-src 'self'", `x-permitted-cross-domain-policies` = "none", | ||
`Referrer-Policy` = "no-referrer-when-downgrade", `Permissions-Policy` = "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()", | ||
Date = "Fri, 17 Nov 2023 10:50:31 GMT"), class = "httr2_headers"), | ||
body = charToRaw("{\"elapsedTime\":\"6.69 secs\",\"count\":0,\"data\":[],\"error\":\"\"}")), class = "httr2_response") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters