Add unit tests for set_form_data()