-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #29
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
base: main
Are you sure you want to change the base?
Conversation
…auto-refreshing tokens on 401 errors; update README and CHANGELOG accordingly.
…for-xurrent Add OAuth client credentials support to API helper
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
…s and updating comments for clarity
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| def fake_request(method, url, headers=None, json=None): | ||
| api_responses.append({"method": method, "url": url, "headers": headers, "json": json}) | ||
| response = MagicMock() | ||
| response.status_code = 200 | ||
| response.ok = True | ||
| response.json.return_value = {"result": "ok"} | ||
| response.headers = {} | ||
| return response | ||
|
|
||
| monkeypatch.setattr(requests, "post", fake_post) | ||
| monkeypatch.setattr(requests, "request", fake_request) | ||
|
|
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.
Monkeypatched requests function never runs
Both OAuth tests replace requests.request, but XurrentApiHelper.api_call always uses the helper’s requests.Session (self.__session.request). The monkeypatch therefore never intercepts the call and the tests will perform a real HTTP request to api.example.com, causing them to fail or require network access. Patch requests.Session.request (or the helper’s session) instead so the tests stay hermetic and exercise the code path.
Useful? React with 👍 / 👎.
Added
client_idandclient_secretinXurrentApiHelperwhile maintaining API key compatibility.