From 6be28b0e99f86b44f227ac8f7595fb0c5660d8e1 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 2 Oct 2017 21:08:58 +0100 Subject: [PATCH] Add test for USE_THOUSAND_SEPARATOR breaking focal point editor --- wagtail/wagtailimages/tests/test_admin_views.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wagtail/wagtailimages/tests/test_admin_views.py b/wagtail/wagtailimages/tests/test_admin_views.py index 7eea7ed171..b576c170c4 100644 --- a/wagtail/wagtailimages/tests/test_admin_views.py +++ b/wagtail/wagtailimages/tests/test_admin_views.py @@ -459,6 +459,15 @@ class TestImageEditView(TestCase, WagtailTestUtils): self.assertNotEqual(self.get_content(new_rendition.file), old_rendition_data) + @override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True) + def test_no_thousand_separators_in_focal_point_editor(self): + large_image = Image.objects.create( + title="Test image", + file=get_test_image_file(size=(1024, 768)), + ) + response = self.client.get(reverse('wagtailimages:edit', args=(large_image.id,))) + self.assertContains(response, 'data-original-width="1024"') + class TestImageDeleteView(TestCase, WagtailTestUtils): def setUp(self):