'Gets CCX schedule and checks number of blocks in it.
Hides nodes at a different depth and checks that these nodes
are not in the schedule.'

@patch('ccx.views.render_to_response', intercept_renderer)
@patch('ccx.views.TODAY')
def test_get_ccx_schedule(self, today):

    today.return_value = datetime.datetime(2014, 11, 25, tzinfo=pytz.UTC)
    self.make_coach()
    ccx = self.make_ccx()
    url = reverse('ccx_coach_dashboard', kwargs={'course_id': CCXLocator.from_course_locator(self.course.id, ccx.id)})
    self.assert_elements_in_schedule(url)
    vertical = self.verticals[0]
    self.hide_node(vertical)
    locations = self.assert_elements_in_schedule(url, n_verticals=7)
    self.assertNotIn(unicode(vertical.location), locations)
    sequential = self.sequentials[0]
    self.hide_node(sequential)
    locations = self.assert_elements_in_schedule(url, n_sequentials=3, n_verticals=6)
    self.assertNotIn(unicode(sequential.location), locations)
    chapter = self.chapters[0]
    self.hide_node(chapter)
    locations = self.assert_elements_in_schedule(url, n_chapters=1, n_sequentials=2, n_verticals=4)
    self.assertNotIn(unicode(chapter.location), locations)
