'Tests the async call to the ccxcon task.
It bypasses all the other calls.'

@mock.patch('openedx.core.djangoapps.ccxcon.tasks.update_ccxcon.delay')
def test_course_published_ccxcon_call(self, mock_upc):

    mock_response = mock.MagicMock(return_value=None)
    mock_upc.return_value = mock_response
    course_id = u'course-v1:OrgFoo+CN199+CR-FALL01'
    course_key = CourseKey.from_string(course_id)
    signal_handler = SignalHandler(modulestore())
    signal_handler.send('course_published', course_key=course_key)
    mock_upc.assert_called_once_with(course_id)
