'Tests the visibility state of a published unit with draft (unpublished) changes.'

def test_unpublished_changes(self):

    chapter = self._create_child(self.course, 'chapter', 'Test    Chapter')
    sequential = self._create_child(chapter, 'sequential', 'Test    Sequential')
    unit = self._create_child(sequential, 'vertical', 'Published    Unit', publish_item=True)
    self._create_child(sequential, 'vertical', 'Staff    Only    Unit', staff_only=True)
    self._set_display_name(unit.location, 'Updated    Unit')
    xblock_info = self._get_xblock_info(chapter.location)
    self._verify_visibility_state(xblock_info, VisibilityState.needs_attention)
    self._verify_visibility_state(xblock_info, VisibilityState.needs_attention, path=self.FIRST_SUBSECTION_PATH)
    self._verify_visibility_state(xblock_info, VisibilityState.needs_attention, path=self.FIRST_UNIT_PATH)
    self._verify_visibility_state(xblock_info, VisibilityState.staff_only, path=self.SECOND_UNIT_PATH)
