-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for metadata fields (app context)
- Loading branch information
Showing
9 changed files
with
944 additions
and
0 deletions.
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
tests/integrational/fixtures/native_sync/metadata/get_all_channel_metadata.json
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 |
---|---|---|
@@ -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\"}" | ||
} | ||
} | ||
} | ||
] | ||
} |
108 changes: 108 additions & 0 deletions
108
tests/integrational/fixtures/native_sync/metadata/get_all_uuid_metadata.json
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 |
---|---|---|
@@ -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\"}" | ||
} | ||
} | ||
} | ||
] | ||
} |
55 changes: 55 additions & 0 deletions
55
tests/integrational/fixtures/native_sync/metadata/get_channel_metadata.json
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 |
---|---|---|
@@ -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\"}}" | ||
} | ||
} | ||
} | ||
] | ||
} |
55 changes: 55 additions & 0 deletions
55
tests/integrational/fixtures/native_sync/metadata/get_uuid_metadata.json
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 |
---|---|---|
@@ -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\"}}" | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.