VAPI-2714 Update the python SDK to include BRTC endpoint APIs#280
VAPI-2714 Update the python SDK to include BRTC endpoint APIs#280
Conversation
- Introduced `SipCredentials` model for managing SIP connection credentials. - Added documentation for `CreateEndpointRequestBase`, `CreateEndpointResponse`, `CreateEndpointResponseObject`, `CreateWebRtcConnectionRequest`, `Device`, `DeviceStatusEnum`, `Endpoint`, `EndpointDirectionEnum`, `EndpointEvent`, `EndpointEventTypeEnum`, `EndpointResponse`, `EndpointStatusEnum`, `EndpointTypeEnum`, `Endpoints`, `EndpointsApi`, `ErrorResponse`, `ListEndpointsResponse`, `Page`, `SipConnectionMetadata`, and `SipCredentials`. - Implemented example usage in the documentation for each model.
- Implement integration tests for creating, retrieving, listing, and deleting WebRTC endpoints in `test/smoke/test_endpoints_api.py`. - Add unit tests for models related to endpoint requests and responses, including `CreateEndpointRequestBase`, `CreateEndpointResponse`, `CreateEndpointResponseObject`, `Device`, and their respective enums in the `test/unit/models` directory. - Ensure tests cover various scenarios including unauthorized and forbidden access attempts. - Validate the functionality of endpoint events and status enums with dedicated unit tests.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…on fields in ListEndpointsResponse tests
… is not ready yet
…emove forbidden credentials test
…WebRtcConnectionRequest, and Endpoint classes
…reateWebRtcConnectionRequest, and Endpoint classes
…-sdk into brtc-python-sdk
There was a problem hiding this comment.
only some of the new models added by this PR are unit tested here, we need to have tests for all of the new models. If you remove test/* temporarily from the openpi-generator-ignore it'll generate test files for all of the models, and you can pick out the new ones as a base for the ones still missing here
There was a problem hiding this comment.
There are still unit tests missing here, I count 19 new models but only 15 new unit tests, we need to have unit tests for every new model.
…sponseData; remove redundant tests from existing models
…n with specific exceptions and adding tests for unauthorized, forbidden, and not found scenarios.
…line error scenarios
…-sdk into brtc-python-sdk
There was a problem hiding this comment.
There are still unit tests missing here, I count 19 new models but only 15 new unit tests, we need to have unit tests for every new model.
| assert_that(response.data.data, instance_of(list)) | ||
| assert_that(len(response.data.data), greater_than(0)) | ||
|
|
||
| listed_ids = [ep.endpoint_id for ep in response.data.data] |
There was a problem hiding this comment.
this assertion is unnecessary, can delete
| assert_that(len(response.data.links), equal_to(0)) | ||
| assert_that(response.data.errors, instance_of(list)) | ||
| assert_that(response.data.data, instance_of(CreateEndpointResponseData)) | ||
| assert_that(response.data.data, has_properties( |
There was a problem hiding this comment.
we've moved away from using has_properties in our tests, can we switch this and other assertions using it to do individual asserts on each proprty
No description provided.