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
feature(Profile Archival): Added social auth removal to Person archive. #1923
feature(Profile Archival): Added social auth removal to Person archive. #1923
Conversation
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 think there's some mocking required. Other than that this looks good.
self.user.save() | ||
self.user.synchronize_usersocialauth() |
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.
Looks like this would call the GitHub API for this user. Can you mock the underlying Github
class (see github_auth.py
for details)?
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.
Gotcha added it.
# Add social auth to admin | ||
self.admin.github = "admin-github" | ||
self.admin.is_active = True | ||
self.admin.synchronize_usersocialauth() |
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.
Does admin account in tests require sync with GitHub?
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.
Not necessarily. I mostly have just done it in case there was any difference between the way the admin works in comparison to the normal user.
60c5a6d
to
72c8327
Compare
72c8327
to
b9d020a
Compare
Fixes #1920
Before Archival:
After Archival: