Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
remote_billing: Improve nocoverage tagging on self_hosting_auth_redirect.
Mateusz Mandera42343cd8d9b6
diff --git a/zerver/views/push_notifications.py b/zerver/views/push_notifications.pyindex bfe4e116e07..7e7e799dc18 100644--- a/zerver/views/push_notifications.py+++ b/zerver/views/push_notifications.py@@ -124,14 +124,14 @@ def self_hosting_auth_redirect(request: HttpRequest,*,next_page: Optional[str] = None,-) -> HttpResponse: # nocoverage- if not uses_notification_bouncer():+) -> HttpResponse:+ if not uses_notification_bouncer(): # nocoveragereturn render(request, "404.html", status=404)user = request.userassert user.is_authenticatedassert isinstance(user, UserProfile)- if not user.has_billing_access:+ if not user.has_billing_access: # nocoverage# We may want to replace this with an html error page at some point,# but this endpoint shouldn't be accessible via the UI to an unauthorized# user - and they need to directly enter the URL in their browser. So a json@@ -164,10 +164,10 @@ def self_hosting_auth_redirect(# Upload realm info and re-try. It should work now.send_server_data_to_push_bouncer(consider_usage_statistics=False)result = send_to_push_bouncer("POST", "server/billing", post_data)- except RemoteRealmServerMismatchError:+ except RemoteRealmServerMismatchError: # nocoveragereturn render(request, "zilencer/remote_realm_server_mismatch_error.html", status=403)- if result["result"] != "success":+ if result["result"] != "success": # nocoverageraise JsonableError(_("Error returned by the bouncer: {result}").format(result=result))redirect_url = result["billing_access_url"]