Skip to content

Commit

Permalink
Updated tests after French translation update
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Apr 4, 2017
1 parent 2dba812 commit 389c3ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tests/admin_utils/test_logentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_logentry_change_message(self):
logentry = LogEntry.objects.filter(content_type__model__iexact='article').latest('id')
self.assertEqual(logentry.get_change_message(), 'Changed title and hist.')
with translation.override('fr'):
self.assertEqual(logentry.get_change_message(), 'Title et hist modifié(s).')
self.assertEqual(logentry.get_change_message(), 'Modification de title et hist.')

add_url = reverse('admin:admin_utils_article_add')
post_data['title'] = 'New'
Expand Down Expand Up @@ -134,8 +134,9 @@ def test_logentry_change_message_formsets(self):
with translation.override('fr'):
self.assertEqual(
logentry.get_change_message(),
"Domain modifié(s). Article « Article object » ajouté. "
"Title modifié(s) pour l'objet article « Article object ». Article « Article object » supprimé."
"Modification de domain. Ajout de article « Article object ». "
"Modification de title pour l'objet article « Article object ». "
"Suppression de article « Article object »."
)

def test_logentry_get_edited_object(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/utils_tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ def test_format_lazy(self):
name='article', object='My first try',
)
with override('fr'):
self.assertEqual('article «\xa0My first try\xa0» ajouté.', s)
self.assertEqual('Ajout de article «\xa0My first try\xa0».', s)

0 comments on commit 389c3ff

Please sign in to comment.