'But ``valid_jsonp_callback_value`` is the function you want to use for
validating JSON-P callback parameter values:'

def test_valid_jsonp_callback_value(self):

    self.assertTrue(valid_jsonp_callback_value('somevar'))
    self.assertFalse(valid_jsonp_callback_value('function'))
    self.assertFalse(valid_jsonp_callback_value('    somevar'))
    self.assertTrue(valid_jsonp_callback_value('$.ajaxHandler'))
    self.assertFalse(valid_jsonp_callback_value('$.23'))
    self.assertTrue(valid_jsonp_callback_value('array_of_functions[42]'))
    self.assertTrue(valid_jsonp_callback_value('array_of_functions[42][1]'))
    self.assertTrue(valid_jsonp_callback_value('$.ajaxHandler[42][1].foo'))
    self.assertFalse(valid_jsonp_callback_value('array_of_functions[42]foo[1]'))
    self.assertFalse(valid_jsonp_callback_value('array_of_functions[]'))
    self.assertFalse(valid_jsonp_callback_value('array_of_functions["key"]'))
