From 32a8c33055fc39d878d134c9020446f00c223525 Mon Sep 17 00:00:00 2001 From: usamasadiq Date: Mon, 6 Apr 2020 13:44:20 +0500 Subject: [PATCH] Django2.2 Post request update --- .../discussion/django_comment_client/base/tests.py | 2 +- .../django_comment_client/tests/group_id.py | 14 +++++++------- lms/djangoapps/discussion/tests/test_views.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lms/djangoapps/discussion/django_comment_client/base/tests.py b/lms/djangoapps/discussion/django_comment_client/base/tests.py index 1d695e5232..de936ae575 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/tests.py +++ b/lms/djangoapps/discussion/django_comment_client/base/tests.py @@ -111,7 +111,7 @@ class CreateThreadGroupIdTestCase( mock_request, "cohorted_topic", self.student, - None + '' ) self._assert_json_response_contains_group_info(response) diff --git a/lms/djangoapps/discussion/django_comment_client/tests/group_id.py b/lms/djangoapps/discussion/django_comment_client/tests/group_id.py index 32b62414a4..9c305cd8ac 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/group_id.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/group_id.py @@ -69,7 +69,7 @@ class CohortedTopicGroupIdTestMixin(GroupIdAssertionMixin): pass def test_cohorted_topic_student_without_group_id(self, mock_request): - self.call_view(mock_request, "cohorted_topic", self.student, None, pass_group_id=False) + self.call_view(mock_request, "cohorted_topic", self.student, '', pass_group_id=False) self._assert_comments_service_called_with_group_id(mock_request, self.student_cohort.id) def test_cohorted_topic_student_none_group_id(self, mock_request): @@ -85,7 +85,7 @@ class CohortedTopicGroupIdTestMixin(GroupIdAssertionMixin): self._assert_comments_service_called_with_group_id(mock_request, self.student_cohort.id) def test_cohorted_topic_moderator_without_group_id(self, mock_request): - self.call_view(mock_request, "cohorted_topic", self.moderator, None, pass_group_id=False) + self.call_view(mock_request, "cohorted_topic", self.moderator, '', pass_group_id=False) self._assert_comments_service_called_without_group_id(mock_request) def test_cohorted_topic_moderator_none_group_id(self, mock_request): @@ -133,11 +133,11 @@ class NonCohortedTopicGroupIdTestMixin(GroupIdAssertionMixin): pass def test_non_cohorted_topic_student_without_group_id(self, mock_request): - self.call_view(mock_request, "non_cohorted_topic", self.student, None, pass_group_id=False) + self.call_view(mock_request, "non_cohorted_topic", self.student, '', pass_group_id=False) self._assert_comments_service_called_without_group_id(mock_request) def test_non_cohorted_topic_student_none_group_id(self, mock_request): - self.call_view(mock_request, "non_cohorted_topic", self.student, None) + self.call_view(mock_request, "non_cohorted_topic", self.student, '') self._assert_comments_service_called_without_group_id(mock_request) def test_non_cohorted_topic_student_with_own_group_id(self, mock_request): @@ -149,11 +149,11 @@ class NonCohortedTopicGroupIdTestMixin(GroupIdAssertionMixin): self._assert_comments_service_called_without_group_id(mock_request) def test_non_cohorted_topic_moderator_without_group_id(self, mock_request): - self.call_view(mock_request, "non_cohorted_topic", self.moderator, None, pass_group_id=False) + self.call_view(mock_request, "non_cohorted_topic", self.moderator, '', pass_group_id=False) self._assert_comments_service_called_without_group_id(mock_request) def test_non_cohorted_topic_moderator_none_group_id(self, mock_request): - self.call_view(mock_request, "non_cohorted_topic", self.moderator, None) + self.call_view(mock_request, "non_cohorted_topic", self.moderator, '') self._assert_comments_service_called_without_group_id(mock_request) def test_non_cohorted_topic_moderator_with_own_group_id(self, mock_request): @@ -176,6 +176,6 @@ class NonCohortedTopicGroupIdTestMixin(GroupIdAssertionMixin): ) team.add_user(self.student) - self.call_view(mock_request, team.discussion_topic_id, self.student, None) + self.call_view(mock_request, team.discussion_topic_id, self.student, '') self._assert_comments_service_called_without_group_id(mock_request) diff --git a/lms/djangoapps/discussion/tests/test_views.py b/lms/djangoapps/discussion/tests/test_views.py index 1e19c7bf31..0fe34381fe 100644 --- a/lms/djangoapps/discussion/tests/test_views.py +++ b/lms/djangoapps/discussion/tests/test_views.py @@ -698,7 +698,7 @@ class SingleThreadAccessTestCase(CohortedTestCase): mock_request, 'non_cohorted_topic', user_not_in_team, - None + '' ) self.assertEqual(403, response.status_code) self.assertEqual(