diff --git a/djangoldp_account/tests/models.py b/djangoldp_account/tests/models.py index c823d4b538cad7dbc5e4f4adb2742d37f7e4145e..3969d56ea780eabaf5961f45a4edf350dc7235ce 100644 --- a/djangoldp_account/tests/models.py +++ b/djangoldp_account/tests/models.py @@ -1,6 +1,6 @@ -from django.conf import settings from django.db import models from djangoldp.models import Model +from djangoldp.permissions import AuthenticatedOnly, OwnerPermissions from djangoldp_account.models import LDPUser @@ -12,5 +12,6 @@ class OwnedResource(Model): class Meta(Model.Meta): owner_field = 'user' + permission_classes = [AuthenticatedOnly, OwnerPermissions] serializer_fields = ['@id', 'description', 'user'] depth = 1 diff --git a/djangoldp_account/tests/tests_auth_backends.py b/djangoldp_account/tests/tests_auth_backends.py index a36ca4f6a2cc851e15d1516b7c9739b17664515e..3272f5b1a13b3a56f89a8724da7f9701e657ac0c 100644 --- a/djangoldp_account/tests/tests_auth_backends.py +++ b/djangoldp_account/tests/tests_auth_backends.py @@ -3,10 +3,7 @@ import uuid from urllib.parse import urlencode from jwkest.jwk import KEYS -try: - from django.urls import reverse -except ImportError: - from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory from django.core.management import call_command