# Path: accounts/forms.py
# class SignUpForm(UserCreationForm):
#     email = forms.CharField(max_length=254, required=True, widget=forms.EmailInput())
# 
#     class Meta:
#         model = User
#         fields = ('username', 'email', 'password1', 'password2')
# 
# Path: accounts/views.py
# def signup(request):
#     if request.method == 'POST':
#         form = SignUpForm(request.POST)
#         if form.is_valid() and recaptcha_is_valid(request):
#             user = form.save()
#             auth_login(request, user)
#             return redirect('home')
#     else:
#         form = SignUpForm()
#     return render(request, 'signup.html', {'form': form})


from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import resolve, reverse
from ..forms import SignUpForm
from ..views import signup



class SignUpTests(TestCase):
    def setUp(self):
        url = reverse('signup')
        self.response = self.client.get(url)


# Path: accounts/forms.py
# class SignUpForm(UserCreationForm):
#     email = forms.CharField(max_length=254, required=True, widget=forms.EmailInput())
# 
#     class Meta:
#         model = User
#         fields = ('username', 'email', 'password1', 'password2')
# 
# Path: accounts/views.py
# def signup(request):
#     if request.method == 'POST':
#         form = SignUpForm(request.POST)
#         if form.is_valid() and recaptcha_is_valid(request):
#             user = form.save()
#             auth_login(request, user)
#             return redirect('home')
#     else:
#         form = SignUpForm()
#     return render(request, 'signup.html', {'form': form})


# Path: accounts/tests/test_view_signup.py
from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import resolve, reverse
from ..forms import SignUpForm
from ..views import signup




class SignUpTests(TestCase):
    def setUp(self):
        url = reverse('signup')
        self.response = self.client.get(url)


    def test_signup_status_code(self):