nix-security-tracker
nix-security-tracker copied to clipboard
Refactor receiver for allauth.signals.user_sign_up
As noted in https://github.com/Nix-Security-WG/nix-security-tracker/pull/165#discussion_r1682547683, the following refactor will improve the readability of the Github sync code and its test suite:
- Move
set_groups_for_new_user
inside theGithubState
class, and connect it to theuser_sign_up
signal within the constructor. - In the tests, trigger the signal and use
@patch
to mock the GitHub requests.