test: added test for Video Room, fix: resolved conflict of duplicated names, enhanced code of 'time' logic by dlunaaa · Pull Request #845 · twilio/twilio-python
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 806
Conversation
Dina Samatova added 2 commits
February 25, 2025 10:47…aming conflict, and add Twilio Video Room test - Improved JWT expiration logic: - Replaced time.time() with datetime.datetime.utcnow() to ensure more accurate expiration handling. - Applied datetime.timedelta(seconds=...) for better timestamp calculations. - Ensured compatibility with jwt.encode() by converting expiration times using .timestamp(). - Resolved naming issue between ALGORITHM and algorithm: - Renamed the algorithm parameter to jwt_algorithm to avoid conflicts with the ALGORITHM constant. - Updated all references to maintain consistency throughout the class. - Added unit test for Twilio Video Room creation: - Integrated unittest framework for structured testing. - Used responses library to mock Twilio API calls. - Implemented a test case that validates room creation by checking sid, unique_name, and status. These updates improve JWT handling, fix potential naming conflicts, and introduce automated testing for Twilio API interactions.
dlunaaa
changed the title
Added test for Video Room, resolved conflict of duplicated names, enhanced code of 'time' logic
test: added test for Video Room, fix: resolved conflict of duplicated names, enhanced code of 'time' logic
This file contains hidden or 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