def test_section_user_list_when_not_primary(self, log_replacement, section_replacement, is_editable_section,
                                             render_replacement):
     """Display section_user_list page when section id is numeric string(sucessful test case) """
     request = self.request
     request.section_id = '123'
     section_replacement.return_value = self.SOME_SECTION
     is_editable_section.return_value = True
     response = section_user_list(request, request.section_id)
     self.assertEqual(self.get_render_context_value(render_replacement, 'allow_edit'), True)
 def test_section_user_list_when_not_primary(self, log_replacement, section_replacement, is_editable_section,
                                             render_replacement, add_role_labels_to_enrollments, **kwargs):
     """Display section_user_list page when section id is numeric string(sucessful test case) """
     request = self.request
     request.section_id = '123'
     add_role_labels_to_enrollments.side_effect = return_unmodified_input
     section_replacement.return_value = self.SOME_SECTION
     is_editable_section.return_value = True
     response = section_user_list(request, request.section_id)
     self.assertEqual(self.get_render_context_value(render_replacement, 'allow_edit'), True)
 def test_section_user_list_when_not_primary(
         self, log_replacement, section_replacement, is_editable_section,
         render_replacement, add_role_labels_to_enrollments, **kwargs):
     """Display section_user_list page when section id is numeric string(sucessful test case) """
     request = self.request
     request.section_id = '123'
     add_role_labels_to_enrollments.side_effect = return_unmodified_input
     section_replacement.return_value = self.SOME_SECTION
     is_editable_section.return_value = True
     response = section_user_list(request, request.section_id)
     self.assertEqual(
         self.get_render_context_value(render_replacement, 'allow_edit'),
         True)
 def test_section_user_list_on_section_id_numeric_string(self, log_replacement, section_replacement,
                                                         render_replacement):
     """Display section_user_list page when section id is numeric string(sucessful test case) """
     request = self.request
     request.section_id = 123
     section_replacement.return_value = self.SOME_SECTION
     response = section_user_list(request, request.section_id)
     render_replacement.assert_called_with(request, 'manage_sections/_section_userlist.html', {
         'allow_edit': ANY,
         'enrollments': ANY,
         'enroll_count': ANY,
         'section_id': int(request.section_id)
     })
 def test_section_user_list_on_section_id_numeric_string(self, log_replacement, section_replacement,
                                                         render_replacement, add_role_labels_to_enrollments, **kwargs):
     """Display section_user_list page when section id is numeric string(sucessful test case) """
     request = self.request
     request.section_id = 123
     add_role_labels_to_enrollments.side_effect = return_unmodified_input
     section_replacement.return_value = self.SOME_SECTION
     response = section_user_list(request, request.section_id)
     render_replacement.assert_called_with(request, 'manage_sections/_section_userlist.html', {
         'allow_edit': ANY,
         'enrollments': ANY,
         'enroll_count': ANY,
         'section_id': int(request.section_id)
     })
 def test_section_user_list_on_section_id_numeric_string(
         self, log_replacement, section_replacement, render_replacement,
         add_role_labels_to_enrollments, **kwargs):
     """Display section_user_list page when section id is numeric string(sucessful test case) """
     request = self.request
     request.section_id = 123
     add_role_labels_to_enrollments.side_effect = return_unmodified_input
     section_replacement.return_value = self.SOME_SECTION
     response = section_user_list(request, request.section_id)
     render_replacement.assert_called_with(
         request, 'manage_sections/_section_userlist.html', {
             'allow_edit': ANY,
             'enrollments': ANY,
             'enroll_count': ANY,
             'section_id': int(request.section_id)
         })