'Scenario: Removing explicit staff lock from a unit which does not inherit staff lock displays a warning.
Given I have a course with a subsection and unit
When I enable explicit staff lock on the unit
And I disable explicit staff lock on the unit
Then I see a modal warning.'

def test_removing_staff_lock_from_unit_without_inherited_lock_shows_warning(self):

    self.course_outline_page.visit()
    self.course_outline_page.expand_all_subsections()
    unit = self.course_outline_page.section_at(0).subsection_at(0).unit_at(0)
    unit.set_staff_lock(True)
    self._remove_staff_lock_and_verify_warning(unit, True)
