'Regression test. Verify that discussion xblocks scheduled for release
in the future are visible to students in a self-paced course.'

@patch.dict('courseware.access.settings.FEATURES', {'DISABLE_START_DATES': False})
def test_self_paced_discussion_xblock_visibility(self):

    (course, section) = self.setup_course(start=self.now, self_paced=True)
    self.create_discussion_xblocks(section)
    xblocks = get_accessible_discussion_xblocks(course, self.non_staff_user)
    self.assertEqual(len(xblocks), 2)
    self.assertTrue(any(((xblock.display_name == 'scheduled') for xblock in xblocks)))
