Refactor receiver for allauth.signals.user_sign_up #166

Open
opened 2024-07-18 16:54:03 +00:00 by alejandrosame · 0 comments
alejandrosame commented 2024-07-18 16:54:03 +00:00 (Migrated from github.com)

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 the GithubState class, and connect it to the user_sign_up signal within the constructor.
  • In the tests, trigger the signal and use @patch to mock the GitHub requests.
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 the `GithubState` class, and connect it to the `user_sign_up` signal within the constructor. - In the tests, trigger the signal and use `@patch` to mock the GitHub requests.
Sign in to join this conversation.
No description provided.