test: added test for Video Room, fix: resolved conflict of duplicated names, enhanced code of 'time' logic #845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(jwt): Improve JWT expiration handling and fix naming conflicts
time.time()withdatetime.datetime.utcnow()to ensure accurate expiration handling.datetime.timedelta(seconds=...)for better timestamp calculations.jwt.encode()by converting expiration times using.timestamp().algorithmtojwt_algorithmto avoid conflicts with theALGORITHMconstant and ensure consistency.test(twilio): Add unit test for Twilio Video Room creation
unittestframework for structured testing.responseslibrary to mock Twilio API calls.sid,unique_name, andstatus.These changes enhance JWT handling, resolve potential naming conflicts, and introduce automated testing for Twilio API interactions.
Fixes #777
Summary of Changes
This PR addresses the following improvements:
Fix for Issue Code Enhancement #777 (JWT Expiration Handling):
time.time()withdatetime.datetime.utcnow()to ensure accurate expiration calculations.datetime.timedelta(seconds=...)to improve timestamp consistency.jwt.encode()by converting expiration times using.timestamp().Resolved SonarCloud issue (Naming Conflict with ALGORITHM):
algorithmparameter tojwt_algorithmto prevent confusion with theALGORITHMconstant.Added a new unit test for Twilio Video Room creation:
unittestframework for structured testing.responseslibrary.sid,unique_name, andstatus.Checklist
.mdfile (not required).If you have questions, please file a support ticket, or create a GitHub Issue in this repository.