Integrate django-scopes (#1319)

* Install django-scopes

* Fix tests.api

* Update tasks and cronjobs

* Fix remaining tests

* Remove unused import

* Fix tests after rebase

* Disable scopes for get_Events_with_any_permission

* Disable scopes for a management command
This commit is contained in:
Raphael Michel
2019-06-17 10:46:55 +02:00
committed by GitHub
parent b1db5dbb3e
commit d85ddb5bda
130 changed files with 6253 additions and 4509 deletions

View File

@@ -2,6 +2,7 @@ import pytest
from django.conf import settings
from django.test import override_settings
from django.utils.timezone import now
from django_scopes import scopes_disabled
from tests import assert_num_queries
from pretix.base.models import Event, Organizer
@@ -97,6 +98,7 @@ def test_event_custom_domain_cache(env):
'LOCATION': 'unique-snowflake',
}
})
@scopes_disabled()
def test_event_custom_domain_cache_clear(env):
kd = KnownDomain.objects.create(domainname='foobar', organizer=env[0])
env[0].cache.clear()