'Tests that an explicitly staff-locked subsection and all of its children are visible to staff only.
In this case the parent section is also visible to staff only because all of its children are staff only.'

def test_staff_only_subsection(self):

    chapter = self._create_child(self.course, 'chapter', 'Test    Chapter')
    sequential = self._create_child(chapter, 'sequential', 'Test    Sequential', staff_only=True)
    vertical = self._create_child(sequential, 'vertical', 'Unit')
    xblock_info = self._get_xblock_info(chapter.location)
    self._verify_visibility_state(xblock_info, VisibilityState.staff_only)
    self._verify_visibility_state(xblock_info, VisibilityState.staff_only, path=self.FIRST_SUBSECTION_PATH)
    self._verify_visibility_state(xblock_info, VisibilityState.staff_only, path=self.FIRST_UNIT_PATH)
    self._verify_explicit_staff_lock_state(xblock_info, False)
    self._verify_explicit_staff_lock_state(xblock_info, True, path=self.FIRST_SUBSECTION_PATH)
    self._verify_explicit_staff_lock_state(xblock_info, False, path=self.FIRST_UNIT_PATH)
    vertical_info = self._get_xblock_info(vertical.location)
    add_container_page_publishing_info(vertical, vertical_info)
    self.assertEqual(_xblock_type_and_display_name(sequential), vertical_info['staff_lock_from'])
