Calls to captcha_set_form_id_setting() using $form_id should really use constants.
At the moment any change to a form_id in drupal means the tests have to be changed. Centralizing these values would stop this from happening in the future.
Could possibly implement this along with
Changing to configuration system would mean you would call something along the lines of config->fieldvalue where field value could be a constant from the config.