def test_signup_form_only_email(self):
        valid_data = {'email': 'hans@gretel.com',
                      'password1': 'blowfish',
                      'password2': 'blowfish'}

        form = forms.SignupFormOnlyEmail(data=valid_data)

        # Should have no username field
        self.assertFalse(form.fields.get('username', False))

        # Form should be valid.
        self.assertTrue(form.is_valid())

        # Creates an unique username
        user = form.save()

        self.assertTrue(len(user.username), 5)
Test that the form has no username field. And that the username is
dataset/ETHPy150Open bread-and-pepper/django-userena/userena/tests/tests_forms.py/SignupFormOnlyEmailTests.test_signup_form_only_email