Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20117 closed Bug (fixed)

Flatpages test failure in a project with language different to 'en'

Reported by: matiasb Owned by: matiasb
Component: contrib.flatpages Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Having a project with contrib.flatpages in INSTALLED_APPS and a LANGUAGE_CODE setting different to 'en' (for example, LANGUAGE_CODE = 'fr-fr'), running flatpages tests I'm getting a failing test:

$ ./manage.py test flatpages
Creating test database for alias 'default'...
.F...............................................
======================================================================
FAIL: test_flatpage_admin_form_url_uniqueness_validation (django.contrib.flatpages.tests.forms.FlatpageAdminFormTests)
The flatpage admin form correctly enforces url uniqueness among flatpages of the same site
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/matiasb/projects/django/dev/django/django/contrib/flatpages/tests/forms.py", line 65, in test_flatpage_admin_form_url_uniqueness_validation
    {'__all__': ['Flatpage with url /myflatpage1/ already exists for site example.com']})
AssertionError: {u'__all__': [u"La page statique \xe0 l'URL /myflatpage1/ existe d\xe9j\xe0 pour le site example.com"]} != {u'__all__': [u'Flatpage with url /myflatpage1/ already exists for site example.com']}

----------------------------------------------------------------------
Ran 49 tests in 4.370s

FAILED (failures=1)

Change History (5)

comment:1 by matiasb, 12 years ago

Has patch: set
Status: newassigned

Created pull request fixing the test: https://github.com/django/django/pull/946
Tests passing with SQLite.

comment:2 by grampajoe, 12 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

Confirmed the failure, and confirmed tests pass with the patch.

comment:3 by grampajoe, 12 years ago

Triage Stage: AcceptedReady for checkin

Moving to RFC. It's a really small fix, and I don't think there's anything left to be done.

comment:4 by matiasb <mbordese@…>, 12 years ago

Resolution: fixed
Status: assignedclosed

In 6985f0c09bdf87509a1ca3c98f7ba45a7a9dbc0c:

Fixed #20117 -- Added missing translation override to fix flatpages test.

comment:5 by Simon Charette <charette.s@…>, 12 years ago

In 151938ddb5f9537c80c1a6426f2c6ce14adc92d9:

Merge pull request #946 from matiasb/minor-flatpage-translation-fix

Fixed #20117 -- Added missing translation override to fix flatpages test.

Note: See TracTickets for help on using tickets.
Back to Top