diff --git a/analytics/tests/test_views.py b/analytics/tests/test_views.py index 0d5234bc8d..a666567e57 100644 --- a/analytics/tests/test_views.py +++ b/analytics/tests/test_views.py @@ -406,7 +406,7 @@ class TestSupportEndpoint(ZulipTestCase): with mock.patch("analytics.views.do_change_plan_type") as m: result = self.client_post("/activity/support", {"realm_id": "1", "plan_type": "2"}) m.assert_called_once_with(get_realm("zulip"), 2) - self.assert_in_success_response(["Plan type of Zulip Dev changed to limited from self hosted"], result) + self.assert_in_success_response(["Plan type of Zulip Dev changed from self hosted to limited"], result) def test_attach_discount(self) -> None: cordelia_email = self.example_email("cordelia") diff --git a/analytics/views.py b/analytics/views.py index b4f9f106a5..052db488da 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -1041,8 +1041,9 @@ def support(request: HttpRequest) -> HttpResponse: new_plan_type = int(new_plan_type) current_plan_type = realm.plan_type do_change_plan_type(realm, new_plan_type) - msg = "Plan type of {} changed to {} from {} ".format(realm.name, get_plan_name(new_plan_type), - get_plan_name(current_plan_type)) + msg = "Plan type of {} changed from {} to {} ".format(realm.name, + get_plan_name(current_plan_type), + get_plan_name(new_plan_type)) context["message"] = msg new_discount = request.POST.get("discount", None)