mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
* Upgrade to Django 2.0 * more models * i18n foo * Update setup.py * Fix Sentry exception PRETIXEU-JC * Enforce slug uniqueness * Import sorting * Upgrade to Django 2.1 * Travis config * Try to fix PostgreSQL failure * Smaller test matrix * staticfiles→static * Include request in all authenticate() calls
18 lines
581 B
Python
18 lines
581 B
Python
from django import urls
|
|
from django.conf import settings
|
|
|
|
from pretix.helpers.urls import build_absolute_uri
|
|
|
|
|
|
def test_site_url_domain():
|
|
settings.SITE_URL = 'https://example.com'
|
|
assert build_absolute_uri('control:auth.login') == 'https://example.com/control/login'
|
|
|
|
|
|
def test_site_url_subpath():
|
|
settings.SITE_URL = 'https://example.com/presale'
|
|
old_prefix = urls.get_script_prefix()
|
|
urls.set_script_prefix('/presale/')
|
|
assert build_absolute_uri('control:auth.login') == 'https://example.com/presale/control/login'
|
|
urls.set_script_prefix(old_prefix)
|