from django.shortcuts import reverse
from django.test import Client

import pytest


@pytest.mark.django_db
@pytest.mark.parametrize('view_name', [
    'person_list',
    'missing_doc',
])
def test_list_views(view_name):
    url = reverse(view_name)
    c = Client()
    response = c.get(url)
    assert response.status_code == 200


@pytest.mark.django_db
@pytest.mark.parametrize('url', [
    '/webapp/login/',
    '/webapp/home/',
    '/webapp/membership/',
    '/webapp/basicformnewperson/',
    '/webapp/basicformnewfamily/',
])
def test_views_exist(url):
    c = Client()
    response = c.get(url)
    assert response.status_code == 200

@@ -616,28 +616,487 @@
 response.status_code == 200%0A
+%0A%0A@pytest.mark.django_db%0A@pytest.mark.parametrize('url', %5B%0A    '/webapp/login/',%0A%5D)%0Adef test_views_post_and_redirect(url):%0A    c = Client()%0A    response = c.post(url)%0A    assert response.status_code == 302%0A%0A%0A@pytest.mark.django_db%0A@pytest.mark.parametrize('url', %5B%0A    '/webapp/basicformnewperson/',%0A    '/webapp/basicformnewfamily/',%0A%5D)%0Adef test_views_post_with_errors(url):%0A    c = Client()%0A    response = c.post(url)%0A    assert response.status_code == 200%0A

Añade más tests