mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Fixed a somehow broken test
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import pytest
|
||||
from django.conf import settings
|
||||
from django.http import Http404
|
||||
from django.test.utils import override_settings
|
||||
from django.utils.timezone import now
|
||||
|
||||
@@ -64,8 +65,8 @@ def test_event_on_custom_domain_only_with_wrong_organizer(env, client):
|
||||
date_from=now(), live=True
|
||||
)
|
||||
KnownDomain.objects.create(domainname='foobar', organizer=env[0])
|
||||
r = client.get('/dummy/1234/', HTTP_HOST='foobar')
|
||||
assert r.status_code == 404
|
||||
with pytest.raises(Http404):
|
||||
client.get('/dummy/1234/', HTTP_HOST='foobar')
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
||||
Reference in New Issue
Block a user