kopia lustrzana https://github.com/wagtail/wagtail
Fixed bad formatted string. Fixes #1334
rodzic
2fc58033b7
commit
8a55446d64
|
@ -46,10 +46,8 @@ class WagtailImageField(ImageField):
|
|||
)
|
||||
|
||||
self.error_messages['file_too_large'] = _(
|
||||
"This file is too big (%%(max_upload_size)s). Maximum filesize %s."
|
||||
) % {
|
||||
'max_upload_size': max_upload_size_text,
|
||||
}
|
||||
"This file is too big (%%s). Maximum filesize %s."
|
||||
) % max_upload_size_text
|
||||
|
||||
def check_image_file_format(self, f):
|
||||
# Check file extension
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import json
|
||||
import unittest
|
||||
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils.http import urlquote
|
||||
|
@ -96,7 +95,6 @@ class TestImageAddView(TestCase, WagtailTestUtils):
|
|||
# The form should have an error
|
||||
self.assertFormError(response, 'form', 'file', "This field is required.")
|
||||
|
||||
@unittest.expectedFailure
|
||||
@override_settings(WAGTAILIMAGES_MAX_UPLOAD_SIZE=1)
|
||||
def test_add_too_large_file(self):
|
||||
response = self.post({
|
||||
|
|
Ładowanie…
Reference in New Issue