mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Added test for serialization of LazyI18nString in settings
This commit is contained in:
@@ -7,6 +7,7 @@ from django.test import TestCase
|
||||
from django.utils.timezone import now
|
||||
|
||||
from pretix.base import settings
|
||||
from pretix.base.i18n import LazyI18nString
|
||||
from pretix.base.models import Event, Organizer, OrganizerSetting, User
|
||||
from pretix.base.settings import SettingsSandbox
|
||||
|
||||
@@ -127,6 +128,9 @@ class SettingsTestCase(TestCase):
|
||||
def test_serialize_list(self):
|
||||
self._test_serialization([1, 2, 'a'], list)
|
||||
|
||||
def test_serialize_lazyi18nstring(self):
|
||||
self._test_serialization(LazyI18nString({'de': 'Hallo', 'en': 'Hello'}), LazyI18nString)
|
||||
|
||||
def test_serialize_bool(self):
|
||||
self._test_serialization(True, bool)
|
||||
self._test_serialization(False, bool)
|
||||
|
||||
Reference in New Issue
Block a user