'Test for a course with invalid CCX connector URL'

@mock.patch('requests_oauthlib.oauth2_session.OAuth2Session.fetch_token', fetch_token_mock)
@mock.patch('requests_oauthlib.oauth2_session.OAuth2Session.post')
def test_course_info_to_ccxcon_invalid_ccx_connector(self, mock_post):

    self.course.ccx_connector = ''
    self.mstore.update_item(self.course, self.instructor.id)
    self.assertIsNone(ccxconapi.course_info_to_ccxcon(self.course_key))
    self.assertEqual(mock_post.call_count, 0)
    self.course.ccx_connector = 'www.foo'
    self.mstore.update_item(self.course, self.instructor.id)
    self.assertIsNone(ccxconapi.course_info_to_ccxcon(self.course_key))
    self.assertEqual(mock_post.call_count, 0)
