-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: adds user.lock() and user.unlock() #123
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
) | ||
url = urls.append_path(self.config.url, f"v1/users/{self.guid}/lock") | ||
body = {"locked": True} | ||
self.session.post(url, json=body) |
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.
Assuming this does not return the updated User record? That's too bad because updated_time
should also be affected by this action. Not a huge deal but just wanted to note.
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.
Yes, the 200 response body is empty for v1/users/{self.guid}/lock
. Adding a subsequent refresh here seems reasonable though.
url = urls.append_path(self.config.url, f"v1/users/{self.guid}")
response = self.session.get(url)
self.update(**response.json())
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.
Related: #141
Screen.Recording.2024-03-22.at.11.06.29.mov
Resolves #100