def test_validate_user_already_registered(self, user):
        # Enters username that is already registered
        form = RegisterForm(username=user.username, email='foo@bar.com', password='example', confirm='example', invite_code="bad")
        assert form.validate() is False
        assert 'Username already registered' in form.username.errors
dataset/ETHPy150Open codeforamerica/comport/tests/test_user_forms.py/TestRegisterForm.test_validate_user_already_registered/original