|
23 | 23 | get_courses_accessible_to_user |
24 | 24 | ) |
25 | 25 | from common.djangoapps.course_action_state.models import CourseRerunState |
26 | | -from common.djangoapps.student.models.user import CourseAccessRole |
27 | 26 | from common.djangoapps.student.roles import ( |
28 | 27 | CourseInstructorRole, |
29 | | - CourseLimitedStaffRole, |
30 | 28 | CourseStaffRole, |
31 | 29 | GlobalStaff, |
32 | 30 | OrgInstructorRole, |
@@ -201,48 +199,6 @@ def test_staff_course_listing(self): |
201 | 199 | with check_mongo_calls(2): |
202 | 200 | list(_accessible_courses_summary_iter(self.request)) |
203 | 201 |
|
204 | | - def test_course_limited_staff_course_listing(self): |
205 | | - # Setup a new course |
206 | | - course_location = self.store.make_course_key('Org', 'CreatedCourse', 'Run') |
207 | | - CourseFactory.create( |
208 | | - org=course_location.org, |
209 | | - number=course_location.course, |
210 | | - run=course_location.run |
211 | | - ) |
212 | | - course = CourseOverviewFactory.create(id=course_location, org=course_location.org) |
213 | | - |
214 | | - # Add the user as a course_limited_staff on the course |
215 | | - CourseLimitedStaffRole(course.id).add_users(self.user) |
216 | | - self.assertTrue(CourseLimitedStaffRole(course.id).has_user(self.user)) |
217 | | - |
218 | | - # Fetch accessible courses list & verify their count |
219 | | - courses_list_by_staff, __ = get_courses_accessible_to_user(self.request) |
220 | | - |
221 | | - # Limited Course Staff should not be able to list courses in Studio |
222 | | - assert len(list(courses_list_by_staff)) == 0 |
223 | | - |
224 | | - def test_org_limited_staff_course_listing(self): |
225 | | - |
226 | | - # Setup a new course |
227 | | - course_location = self.store.make_course_key('Org', 'CreatedCourse', 'Run') |
228 | | - CourseFactory.create( |
229 | | - org=course_location.org, |
230 | | - number=course_location.course, |
231 | | - run=course_location.run |
232 | | - ) |
233 | | - course = CourseOverviewFactory.create(id=course_location, org=course_location.org) |
234 | | - |
235 | | - # Add a user as course_limited_staff on the org |
236 | | - # This is not possible using the course roles classes but is possible via Django admin so we |
237 | | - # insert a row into the model directly to test that scenario. |
238 | | - CourseAccessRole.objects.create(user=self.user, org=course_location.org, role=CourseLimitedStaffRole.ROLE) |
239 | | - |
240 | | - # Fetch accessible courses list & verify their count |
241 | | - courses_list_by_staff, __ = get_courses_accessible_to_user(self.request) |
242 | | - |
243 | | - # Limited Course Staff should not be able to list courses in Studio |
244 | | - assert len(list(courses_list_by_staff)) == 0 |
245 | | - |
246 | 202 | def test_get_course_list_with_invalid_course_location(self): |
247 | 203 | """ |
248 | 204 | Test getting courses with invalid course location (course deleted from modulestore). |
|
0 commit comments