'Verify a validator checking invalid course keys.'

def test_validate_course_id_with_invalid_key(self):

    course_key = 'invalidkey'
    error_msg = u'{}    is    not    a    valid    course    key.'.format(course_key)
    with self.assertRaisesRegexp(serializers.ValidationError, error_msg):
        validate_course_id(course_key)
