Ticket #7745: 23compat.diff
File 23compat.diff, 1.4 KB (added by , 16 years ago) |
---|
-
tests/regressiontests/admin_scripts/tests.py
108 108 self.assertEquals(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream) 109 109 def assertOutput(self, stream, msg): 110 110 "Utility assertion: assert that the given message exists in the output" 111 self. assertTrue(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))111 self.failUnless(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream)) 112 112 113 113 ########################################################################## 114 114 # DJANGO ADMIN TESTS -
tests/regressiontests/utils/datastructures.py
1 # Python 2.3 doesn't have sorted() 2 try: 3 sorted 4 except NameError: 5 from django.utils.itercompat import sorted 6 1 7 """ 2 8 >>> from django.utils.datastructures import SortedDict 3 9 … … 50 56 ['second-two', 'one'] 51 57 """ 52 58 53 # Python 2.3 doesn't have sorted()54 try:55 sorted56 except NameError:57 from django.utils.itercompat import sorted58 59 No newline at end of file