Browse Source

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

tags/16.0.0.0b2
Zuul 1 week ago
parent
commit
970077c961
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      horizon/test/unit/tables/test_tables.py

+ 7
- 2
horizon/test/unit/tables/test_tables.py View File

@@ -18,6 +18,7 @@
18 18
 import unittest
19 19
 import uuid
20 20
 
21
+import django
21 22
 from django import forms
22 23
 from django import http
23 24
 from django import shortcuts
@@ -668,8 +669,12 @@ class DataTableTests(test.TestCase):
668 669
         row = self.table.get_rows()[0]
669 670
 
670 671
         self.assertEqual(35, len(row.cells['status'].data))
671
-        self.assertEqual(u'A Status that is longer than 35 ...',
672
-                         row.cells['status'].data)
672
+        if django.VERSION >= (2, 2):
673
+            self.assertEqual(u'A Status that is longer than 35 ch…',
674
+                             row.cells['status'].data)
675
+        else:
676
+            self.assertEqual(u'A Status that is longer than 35 ...',
677
+                             row.cells['status'].data)
673 678
 
674 679
     def test_table_rendering(self):
675 680
         self.table = MyTable(self.request, TEST_DATA)

Loading…
Cancel
Save