auth: Improve logic for invalid GitHub emails.

This deletes the old mock-covered test for this, which was mostly
useless.  We have a much less messy test, which we extend to provide
the same test coverage the old one did.

While the result was the same before, this makes it more obvious.
This commit is contained in:
Tim Abbott
2017-11-21 16:14:55 -08:00
committed by Greg Price
parent 766511e519
commit 732dd1b6a3
2 changed files with 3 additions and 23 deletions

View File

@@ -249,6 +249,7 @@ class SocialAuthMixin(ZulipAuthMixin):
logging.warning(
"{} got invalid email argument.".format(self.auth_backend_name)
)
return None
strategy = self.strategy # type: ignore # This comes from Python Social Auth.
request = strategy.request