|
|
@ -1,12 +1,12 @@ |
|
|
|
import pytest |
|
|
|
from django.apps import apps |
|
|
|
from django.contrib.auth import get_user_model |
|
|
|
from django.contrib.auth.management import _get_all_permissions |
|
|
|
from django.contrib.auth.models import Permission |
|
|
|
from django.contrib.contenttypes.models import ContentType |
|
|
|
from django.db import transaction |
|
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
|
from django.utils.translation import string_concat |
|
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
|
import pytest |
|
|
|
|
|
|
|
from sapl.crud.base import PermissionRequiredForAppCrudMixin |
|
|
|
from sapl.rules.apps import AppConfig, update_groups |
|
|
@ -14,6 +14,7 @@ from scripts.lista_urls import lista_urls |
|
|
|
|
|
|
|
from .settings import SAPL_APPS |
|
|
|
|
|
|
|
|
|
|
|
pytestmark = pytest.mark.django_db |
|
|
|
|
|
|
|
sapl_appconfs = [apps.get_app_config(n[5:]) for n in SAPL_APPS] |
|
|
@ -72,6 +73,7 @@ def create_perms_post_migrate(sapl_app_config): |
|
|
|
] |
|
|
|
Permission.objects.bulk_create(perms) |
|
|
|
|
|
|
|
|
|
|
|
btn_login = ('<input class="btn btn-success btn-sm" ' |
|
|
|
'type="submit" value="login" />') |
|
|
|
|
|
|
@ -259,7 +261,6 @@ apps_url_patterns_prefixs_and_users = { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.skip(reason="TODO: Lento demais. Precisa ser refatorado") |
|
|
|
@pytest.mark.parametrize('url_item', _lista_urls) |
|
|
|
def test_urlpatterns(url_item, admin_client): |
|
|
|
|
|
|
|