From 6985f0c09bdf87509a1ca3c98f7ba45a7a9dbc0c Mon Sep 17 00:00:00 2001 From: matiasb Date: Sat, 23 Mar 2013 12:15:10 -0300 Subject: [PATCH] Fixed #20117 -- Added missing translation override to fix flatpages test. --- django/contrib/flatpages/tests/forms.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/django/contrib/flatpages/tests/forms.py b/django/contrib/flatpages/tests/forms.py index 3bdfa15dfe..29fc0cabb9 100644 --- a/django/contrib/flatpages/tests/forms.py +++ b/django/contrib/flatpages/tests/forms.py @@ -58,11 +58,12 @@ class FlatpageAdminFormTests(TestCase): f = FlatpageForm(data=data) - self.assertFalse(f.is_valid()) + with translation.override('en'): + self.assertFalse(f.is_valid()) - self.assertEqual( - f.errors, - {'__all__': ['Flatpage with url /myflatpage1/ already exists for site example.com']}) + self.assertEqual( + f.errors, + {'__all__': ['Flatpage with url /myflatpage1/ already exists for site example.com']}) def test_flatpage_admin_form_edit(self): """