Merge "django22: Django now truncates using the ellipsis character"

This commit is contained in:
Zuul 2019-09-10 10:30:01 +00:00 committed by Gerrit Code Review
commit 970077c961
1 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,7 @@
import unittest
import uuid
import django
from django import forms
from django import http
from django import shortcuts
@ -668,8 +669,12 @@ class DataTableTests(test.TestCase):
row = self.table.get_rows()[0]
self.assertEqual(35, len(row.cells['status'].data))
self.assertEqual(u'A Status that is longer than 35 ...',
row.cells['status'].data)
if django.VERSION >= (2, 2):
self.assertEqual(u'A Status that is longer than 35 ch…',
row.cells['status'].data)
else:
self.assertEqual(u'A Status that is longer than 35 ...',
row.cells['status'].data)
def test_table_rendering(self):
self.table = MyTable(self.request, TEST_DATA)