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()
.algorithm
tojwt_algorithm
to avoid conflicts with theALGORITHM
constant and ensure consistency.test(twilio): Add unit test for Twilio Video Room creation
unittest
framework for structured testing.responses
library 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):
algorithm
parameter tojwt_algorithm
to prevent confusion with theALGORITHM
constant.Added a new unit test for Twilio Video Room creation:
unittest
framework for structured testing.responses
library.sid
,unique_name
, andstatus
.Checklist
.md
file (not required).If you have questions, please file a support ticket, or create a GitHub Issue in this repository.