'Scenario: All units in a section are explicitly locked, section should display staff only warning
Given I have a course with one section, two subsections, and four units
When I enable explicit staff lock on all the units
Then the section shows a staff lock warning'

def test_section_displays_lock_when_all_units_locked(self):

    self.course_outline_page.visit()
    self.course_outline_page.expand_all_subsections()
    section = self.course_outline_page.section_at(0)
    section.subsection_at(0).unit_at(0).set_staff_lock(True)
    section.subsection_at(0).unit_at(1).set_staff_lock(True)
    section.subsection_at(1).unit_at(0).set_staff_lock(True)
    section.subsection_at(1).unit_at(1).set_staff_lock(True)
    self.assertTrue(section.has_staff_lock_warning)
