'Tests the visibility state of a published unit with release date in the future.'

def test_published_unit(self):

    chapter = self._create_child(self.course, 'chapter', 'Test    Chapter')
    sequential = self._create_child(chapter, 'sequential', 'Test    Sequential')
    self._create_child(sequential, 'vertical', 'Published    Unit', publish_item=True)
    self._create_child(sequential, 'vertical', 'Staff    Only    Unit', staff_only=True)
    self._set_release_date(chapter.location, (datetime.now(UTC) + timedelta(days=1)))
    xblock_info = self._get_xblock_info(chapter.location)
    self._verify_visibility_state(xblock_info, VisibilityState.ready)
    self._verify_visibility_state(xblock_info, VisibilityState.ready, path=self.FIRST_SUBSECTION_PATH)
    self._verify_visibility_state(xblock_info, VisibilityState.ready, path=self.FIRST_UNIT_PATH)
    self._verify_visibility_state(xblock_info, VisibilityState.staff_only, path=self.SECOND_UNIT_PATH)
