'Retrieve the registration form description from the server and
verify that it contains the expected field.
Args:
extra_fields_setting (dict): Override the Django setting controlling
which extra fields are displayed in the form.
expected_field (dict): The field definition we expect to find in the form.
Raises:
AssertionError'

def _assert_reg_field(self, extra_fields_setting, expected_field):

    self._populate_always_present_fields(expected_field)
    with override_settings(REGISTRATION_EXTRA_FIELDS=extra_fields_setting):
        response = self.client.get(self.url)
        self.assertHttpOK(response)
    form_desc = json.loads(response.content)
    actual_field = None
    for field in form_desc['fields']:
        if (field['name'] == expected_field['name']):
            actual_field = field
            break
    self._assert_fields_match(actual_field, expected_field)
