mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
* Fix #294 - blacklist for slug validation * Fix #294 - blacklist for slug validation * fix for failing test
This commit is contained in:
committed by
Raphael Michel
parent
4820a8423f
commit
9662b956ed
@@ -1,3 +1,4 @@
|
||||
import datetime
|
||||
import sys
|
||||
from datetime import timedelta
|
||||
|
||||
@@ -601,6 +602,16 @@ class EventTest(TestCase):
|
||||
|
||||
self.assertIn('presale_end', str(context.exception))
|
||||
|
||||
def test_slug_validation(self):
|
||||
event = Event(
|
||||
organizer=self.organizer, name='Download', slug='download',
|
||||
date_from=datetime.datetime(2013, 12, 26, tzinfo=datetime.timezone.utc)
|
||||
)
|
||||
with self.assertRaises(ValidationError) as context:
|
||||
event.full_clean()
|
||||
|
||||
self.assertIn('slug', str(context.exception))
|
||||
|
||||
|
||||
class CachedFileTestCase(TestCase):
|
||||
def test_file_handling(self):
|
||||
|
||||
Reference in New Issue
Block a user