def test_registration_form_adds_custom_user_name_field(self):
        """
        Test that ``RegistrationForm`` adds custom username
        field and does not raise errors

        """

        form = forms.RegistrationForm()

        self.assertTrue(UsernameField() in form.fields)
dataset/ETHPy150Open macropin/django-registration/registration/tests/forms_custom_user.py/RegistrationFormTests.test_registration_form_adds_custom_user_name_field/original