From f6be77d49362a30b031e960aa368d0c9eec51f13 Mon Sep 17 00:00:00 2001
From: Ahtisham Shahid
Date: Tue, 31 Mar 2020 14:52:12 +0500
Subject: [PATCH] Removed tech email form error templates
fixed tests
fixed test fail
Fixed failing tests
---
lms/djangoapps/static_template_view/tests/test_views.py | 3 ---
lms/templates/courseware/error-message.html | 3 ++-
lms/templates/static_templates/404.html | 5 ++---
lms/templates/static_templates/server-down.html | 5 +----
lms/templates/static_templates/server-error.html | 6 +-----
lms/templates/static_templates/server-overloaded.html | 7 ++-----
6 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/lms/djangoapps/static_template_view/tests/test_views.py b/lms/djangoapps/static_template_view/tests/test_views.py
index 749fcd4abf..5b10380b97 100644
--- a/lms/djangoapps/static_template_view/tests/test_views.py
+++ b/lms/djangoapps/static_template_view/tests/test_views.py
@@ -71,8 +71,6 @@ class MarketingSiteViewTests(TestCase):
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
self.assertEqual(resp['Content-Type'], 'text/html')
- resp = self.client.get(url)
- self.assertContains(resp, settings.TECH_SUPPORT_EMAIL)
def test_500(self):
"""
@@ -92,4 +90,3 @@ class MarketingSiteViewTests(TestCase):
),
status_code=500
)
- self.assertContains(resp, settings.TECH_SUPPORT_EMAIL, status_code=500)
diff --git a/lms/templates/courseware/error-message.html b/lms/templates/courseware/error-message.html
index 3f88d93d10..dc74974487 100644
--- a/lms/templates/courseware/error-message.html
+++ b/lms/templates/courseware/error-message.html
@@ -8,4 +8,5 @@ from openedx.core.djangolib.markup import HTML, Text
<%
tech_support_email=HTML('{tech_support_email}').format(tech_support_email=static.get_tech_support_email_address())
%>
-${Text(_("We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at {tech_support_email} to report any problems or downtime.")).format(tech_support_email=tech_support_email)}
+${Text(_("We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible."))}
+
diff --git a/lms/templates/static_templates/404.html b/lms/templates/static_templates/404.html
index 28c01904bb..6e0ad2268b 100644
--- a/lms/templates/static_templates/404.html
+++ b/lms/templates/static_templates/404.html
@@ -18,10 +18,9 @@ from openedx.core.djangolib.markup import HTML, Text
% if page_content:
${page_content}
% else:
- ${Text(_('The page that you were looking for was not found. Go back to the {link_start}homepage{link_end} or let us know about any pages that may have been moved at {email}.')).format(
+ ${Text(_('The page that you were looking for was not found. Go back to the {link_start}homepage{link_end} .')).format(
link_start=HTML(''),
- link_end=HTML(''),
- email=HTML('{email}').format(email=Text(static.get_tech_support_email_address()))
+ link_end=HTML('')
)}
% endif
%block>
diff --git a/lms/templates/static_templates/server-down.html b/lms/templates/static_templates/server-down.html
index 982bb1ea19..1bfb1b27bb 100644
--- a/lms/templates/static_templates/server-down.html
+++ b/lms/templates/static_templates/server-down.html
@@ -24,10 +24,7 @@ from openedx.core.djangolib.markup import HTML, Text
% if page_content:
${page_content}
% else:
- ${Text(_("Our staff is currently working to get the site back up as soon as possible. "
- "Please email us at {tech_support_email} to report any problems or downtime.")).format(
- tech_support_email=HTML('{0}').format(Text(static.get_tech_support_email_address()))
- )}
+ ${Text(_("Our staff is currently working to get the site back up as soon as possible. "))}
% endif
%block>
diff --git a/lms/templates/static_templates/server-error.html b/lms/templates/static_templates/server-error.html
index 4a022d931b..89e7b99b7a 100644
--- a/lms/templates/static_templates/server-error.html
+++ b/lms/templates/static_templates/server-error.html
@@ -24,11 +24,7 @@ from openedx.core.djangolib.markup import HTML, Text
% if page_content:
${page_content}
% else:
- ${Text(_('Please wait a few seconds and then reload the page. If the problem persists, please email us at {email}.')).format(
- email=HTML('{email}').format(
- email=Text(static.get_tech_support_email_address())
- )
- )}
+ ${Text(_('Please wait a few seconds and then reload the page.'))}
% endif
%block>
diff --git a/lms/templates/static_templates/server-overloaded.html b/lms/templates/static_templates/server-overloaded.html
index 0b5d9c00bb..4511e6b4df 100644
--- a/lms/templates/static_templates/server-overloaded.html
+++ b/lms/templates/static_templates/server-overloaded.html
@@ -20,14 +20,11 @@ from openedx.core.djangolib.markup import HTML, Text
%block>
- <%block name="pagecontent">
+ <%block name="pagecontent">
% if page_content:
${page_content}
% else:
- ${Text(_("Our staff is currently working to get the site back up as soon as possible. "
- "Please email us at {tech_support_email} to report any problems or downtime.")).format(
- tech_support_email=HTML('{0}').format(tech_support_email=Text(static.get_tech_support_email_address()))
- )}
+ ${Text(_("Our staff is currently working to get the site back up as soon as possible. "))}
% endif
%block>