Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pytest
- from yunojuno.apps.profiles.views.user_registration_views import (
- select_user_type,
- )
- from django.test.client import RequestFactory
- @pytest.mark.django_db
- def test_select_user_type():
- request = RequestFactory()
- request.session = {}
- request.POST = {'user_type': 'freelancer'}
- request.method = 'POST'
- response = select_user_type(request)
- assert response.status_code == 302
Advertisement
Add Comment
Please, Sign In to add comment