Skip to content

Commit

Permalink
Add tests for metadata fields (app context)
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Mar 7, 2024
1 parent 0fc4697 commit 424c218
Show file tree
Hide file tree
Showing 9 changed files with 944 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"version": 1,
"interactions": [
{
"request": {
"method": "PATCH",
"uri": "https://ps.pndsn.com/v2/objects/{PN_KEY_SUBSCRIBE}/channels/metadata_channel-two?include=custom%2Cstatus%2Ctype",
"body": "{\"name\": \"name\", \"description\": \"This is a description\", \"custom\": {\"foo\": \"bar\"}, \"status\": \"Testing\", \"type\": \"test\"}",
"headers": {
"User-Agent": [
"PubNub-Python/7.4.0"
],
"Accept-Encoding": [
"gzip, deflate"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"119"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": [
"Wed, 06 Mar 2024 20:43:38 GMT"
],
"Content-Length": [
"241"
],
"Access-Control-Allow-Credentials": [
"true"
],
"Content-Type": [
"application/json"
],
"Connection": [
"keep-alive"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"body": {
"string": "{\"status\":200,\"data\":{\"id\":\"metadata_channel-two\",\"name\":\"name\",\"description\":\"This is a description\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:38.231243Z\",\"eTag\":\"f5046bfa9750b8b2cad4cd90ddacec76\"}}"
}
}
},
{
"request": {
"method": "GET",
"uri": "https://ps.pndsn.com/v2/objects/{PN_KEY_SUBSCRIBE}/channels?include=custom%2Cstatus%2Ctype",
"body": null,
"headers": {
"User-Agent": [
"PubNub-Python/7.4.0"
],
"Accept-Encoding": [
"gzip, deflate"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": [
"Wed, 06 Mar 2024 20:43:38 GMT"
],
"Content-Length": [
"471"
],
"Access-Control-Allow-Credentials": [
"true"
],
"Content-Type": [
"application/json"
],
"Connection": [
"keep-alive"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"body": {
"string": "{\"status\":200,\"data\":[{\"id\":\"metadata_channel\",\"name\":\"name\",\"description\":\"This is a description\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:37.715484Z\",\"eTag\":\"d392f5ad1048cc8980f549c104b9b958\"},{\"id\":\"metadata_channel-two\",\"name\":\"name\",\"description\":\"This is a description\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:38.231243Z\",\"eTag\":\"f5046bfa9750b8b2cad4cd90ddacec76\"}],\"next\":\"Mg\"}"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"version": 1,
"interactions": [
{
"request": {
"method": "PATCH",
"uri": "https://ps.pndsn.com/v2/objects/{PN_KEY_SUBSCRIBE}/uuids/metadata_uuid-two?include=custom%2Cstatus%2Ctype",
"body": "{\"name\": \"name\", \"email\": \"[email protected]\", \"externalId\": \"externalId\", \"profileUrl\": \"https://127.0.0.1\", \"custom\": {\"foo\": \"bar\"}, \"status\": \"Testing\", \"type\": \"test\"}",
"headers": {
"User-Agent": [
"PubNub-Python/7.4.0"
],
"Accept-Encoding": [
"gzip, deflate"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"172"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": [
"Wed, 06 Mar 2024 20:43:39 GMT"
],
"Content-Length": [
"287"
],
"Access-Control-Allow-Credentials": [
"true"
],
"Content-Type": [
"application/json"
],
"Connection": [
"keep-alive"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"body": {
"string": "{\"status\":200,\"data\":{\"id\":\"metadata_uuid-two\",\"name\":\"name\",\"externalId\":\"externalId\",\"profileUrl\":\"https://127.0.0.1\",\"email\":\"[email protected]\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:39.652544Z\",\"eTag\":\"64eea57a0b1f3cd866dd0ecd21646bb5\"}}"
}
}
},
{
"request": {
"method": "GET",
"uri": "https://ps.pndsn.com/v2/objects/{PN_KEY_SUBSCRIBE}/uuids?include=custom%2Cstatus%2Ctype",
"body": null,
"headers": {
"User-Agent": [
"PubNub-Python/7.4.0"
],
"Accept-Encoding": [
"gzip, deflate"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": [
"Wed, 06 Mar 2024 20:43:39 GMT"
],
"Content-Length": [
"563"
],
"Access-Control-Allow-Credentials": [
"true"
],
"Content-Type": [
"application/json"
],
"Connection": [
"keep-alive"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"body": {
"string": "{\"status\":200,\"data\":[{\"id\":\"metadata_uuid\",\"name\":\"name\",\"externalId\":\"externalId\",\"profileUrl\":\"https://127.0.0.1\",\"email\":\"[email protected]\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:39.217435Z\",\"eTag\":\"7130ce49e71002c4fc018aa7678bc44e\"},{\"id\":\"metadata_uuid-two\",\"name\":\"name\",\"externalId\":\"externalId\",\"profileUrl\":\"https://127.0.0.1\",\"email\":\"[email protected]\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:39.652544Z\",\"eTag\":\"64eea57a0b1f3cd866dd0ecd21646bb5\"}],\"next\":\"Mg\"}"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": 1,
"interactions": [
{
"request": {
"method": "GET",
"uri": "https://ps.pndsn.com/v2/objects/{PN_KEY_SUBSCRIBE}/channels/metadata_channel?include=custom%2Cstatus%2Ctype",
"body": null,
"headers": {
"User-Agent": [
"PubNub-Python/7.4.0"
],
"Accept-Encoding": [
"gzip, deflate"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": [
"Wed, 06 Mar 2024 20:43:37 GMT"
],
"Content-Length": [
"237"
],
"Access-Control-Allow-Credentials": [
"true"
],
"Content-Type": [
"application/json"
],
"Connection": [
"keep-alive"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"body": {
"string": "{\"status\":200,\"data\":{\"id\":\"metadata_channel\",\"name\":\"name\",\"description\":\"This is a description\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:37.715484Z\",\"eTag\":\"d392f5ad1048cc8980f549c104b9b958\"}}"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": 1,
"interactions": [
{
"request": {
"method": "GET",
"uri": "https://ps.pndsn.com/v2/objects/{PN_KEY_SUBSCRIBE}/uuids/metadata_uuid?include=custom%2Cstatus%2Ctype",
"body": null,
"headers": {
"User-Agent": [
"PubNub-Python/7.4.0"
],
"Accept-Encoding": [
"gzip, deflate"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Date": [
"Wed, 06 Mar 2024 20:43:39 GMT"
],
"Content-Length": [
"283"
],
"Access-Control-Allow-Credentials": [
"true"
],
"Content-Type": [
"application/json"
],
"Connection": [
"keep-alive"
],
"Access-Control-Allow-Origin": [
"*"
]
},
"body": {
"string": "{\"status\":200,\"data\":{\"id\":\"metadata_uuid\",\"name\":\"name\",\"externalId\":\"externalId\",\"profileUrl\":\"https://127.0.0.1\",\"email\":\"[email protected]\",\"type\":\"test\",\"status\":\"Testing\",\"custom\":{\"foo\":\"bar\"},\"updated\":\"2024-03-06T20:43:39.217435Z\",\"eTag\":\"7130ce49e71002c4fc018aa7678bc44e\"}}"
}
}
}
]
}
Loading

0 comments on commit 424c218

Please sign in to comment.