mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-12-14 07:42:24 +03:00
Re-format all files
This commit is contained in:
@@ -16,7 +16,7 @@ class LocalizedFileFieldFormTestCase(TestCase):
|
||||
with self.assertRaises(ValidationError):
|
||||
formfield.clean([])
|
||||
with self.assertRaises(ValidationError):
|
||||
formfield.clean([], {'en': None})
|
||||
formfield.clean([], {"en": None})
|
||||
with self.assertRaises(ValidationError):
|
||||
formfield.clean("badvalue")
|
||||
with self.assertRaises(ValidationError):
|
||||
@@ -24,17 +24,17 @@ class LocalizedFileFieldFormTestCase(TestCase):
|
||||
formfield.clean(value)
|
||||
|
||||
formfield = LocalizedFileFieldForm(required=False)
|
||||
formfield.clean([''] * len(settings.LANGUAGES))
|
||||
formfield.clean(['', ''], ['', ''])
|
||||
formfield.clean([""] * len(settings.LANGUAGES))
|
||||
formfield.clean(["", ""], ["", ""])
|
||||
|
||||
def test_bound_data(self):
|
||||
"""Tests whether the :see:bound_data function is returns correctly
|
||||
value"""
|
||||
value."""
|
||||
|
||||
formfield = LocalizedFileFieldForm()
|
||||
assert formfield.bound_data([''], None) == ['']
|
||||
assert formfield.bound_data([""], None) == [""]
|
||||
|
||||
initial = dict([(lang, '') for lang, _ in settings.LANGUAGES])
|
||||
initial = dict([(lang, "") for lang, _ in settings.LANGUAGES])
|
||||
value = [None] * len(settings.LANGUAGES)
|
||||
expected_value = [''] * len(settings.LANGUAGES)
|
||||
expected_value = [""] * len(settings.LANGUAGES)
|
||||
assert formfield.bound_data(value, initial) == expected_value
|
||||
|
||||
Reference in New Issue
Block a user