specify that mock.patch is temporary

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
This commit is contained in:
Min RK
2021-02-01 07:05:24 +00:00
committed by GitHub
parent d3147f3fb7
commit 1b12107c54

View File

@@ -833,7 +833,7 @@ class HubAuthenticated(object):
# add state argument to OAuth url
state = self.hub_auth.set_state_cookie(self, next_url=self.request.uri)
login_url = url_concat(login_url, {'state': state})
# override at setting level,
# temporary override at setting level,
# to allow any subclass overrides of get_login_url to preserve their effect
# for example, APIHandler raises 403 to prevent redirects
with mock.patch.dict(self.application.settings, {"login_url": login_url}):