-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TDL-26718: Implement token chaining #123
TDL-26718: Implement token chaining #123
Conversation
c9e942f
to
eef630c
Compare
@patch("singer.utils.now") | ||
def test_expired_access_token(self, mock_now, mock_timer): | ||
"""Return true when the token is expired.""" | ||
mock_now.return_value = utils.strptime_with_tz("2024-12-24T12:23:41Z") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hard-coded dates we should use relative dates to current dates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with unit tests update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some suggestions in-line.
|
||
@patch("singer.http_request_timer") | ||
def test_expired_access_token(self, mock_timer): | ||
"""Return true when the token is expired.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Token expires in 30 days but square recommends to refresh it after 7 days so I think this doc string is misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
@patch("singer.http_request_timer") | ||
def test_almost_expired_access_token(self, mock_timer): | ||
"""Return false when the token is exact just 7 days ago""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some typo in this doc string?
"""Return false when the token is exact just 7 days ago""" | |
"""Return false when the token is created exactly 7 days ago""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested few minor changes in-line.
…o/tap-square into TDL-26718-preserve-access-token
Description of change
Manual QA steps
Risks
Rollback steps
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code