From dee102a70b92899803338881bb13b4d3a265e51a Mon Sep 17 00:00:00 2001 From: Jawayria Date: Fri, 10 Sep 2021 18:14:07 +0500 Subject: [PATCH 1/2] fix: Added the condition on body_type in test_reset_password --- .../djangoapps/user_authn/views/tests/test_reset_password.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py index 89f273e651..108f0868a4 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py @@ -284,7 +284,7 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase): body = bodies[body_type] - if django.VERSION >= (3, 0): + if django.VERSION >= (3, 0) and body_type=='html': expected_output = "You're receiving this e-mail because you requested a password reset" assert 'Password reset' in sent_message.subject From a3fd502bab7dc21654fd3dc57eb39abab550618a Mon Sep 17 00:00:00 2001 From: Jawayria Date: Fri, 10 Sep 2021 21:10:21 +0500 Subject: [PATCH 2/2] fix quality --- .../djangoapps/user_authn/views/tests/test_reset_password.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py index 108f0868a4..eeaf61249d 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py @@ -284,7 +284,7 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase): body = bodies[body_type] - if django.VERSION >= (3, 0) and body_type=='html': + if django.VERSION >= (3, 0) and body_type == 'html': expected_output = "You're receiving this e-mail because you requested a password reset" assert 'Password reset' in sent_message.subject