From c832885a3e8659d4a704bf103d523b610c24e4ec Mon Sep 17 00:00:00 2001 From: mackong Date: Sat, 18 Aug 2018 22:16:22 +0800 Subject: Fixed #29426 -- Made UUID inputs in the admin match the width of a UUID. --- tests/admin_widgets/tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/admin_widgets') diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 43cf9f4182..f7c2a7865c 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -408,6 +408,20 @@ class AdminURLWidgetTest(SimpleTestCase): ) +class AdminUUIDWidgetTests(SimpleTestCase): + def test_attrs(self): + w = widgets.AdminUUIDInputWidget() + self.assertHTMLEqual( + w.render('test', '550e8400-e29b-41d4-a716-446655440000'), + '', + ) + w = widgets.AdminUUIDInputWidget(attrs={'class': 'myUUIDInput'}) + self.assertHTMLEqual( + w.render('test', '550e8400-e29b-41d4-a716-446655440000'), + '', + ) + + @override_settings(ROOT_URLCONF='admin_widgets.urls') class AdminFileWidgetTests(TestDataMixin, TestCase): -- cgit v1.3