Ticket #7745: 23compat.diff

File 23compat.diff, 1.4 KB (added by Karen Tracey <kmtracey@…>, 16 years ago)
  • tests/regressiontests/admin_scripts/tests.py

     
    108108        self.assertEquals(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
    109109    def assertOutput(self, stream, msg):
    110110        "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))
    112112
    113113##########################################################################
    114114# DJANGO ADMIN TESTS
  • tests/regressiontests/utils/datastructures.py

     
     1# Python 2.3 doesn't have sorted()
     2try:
     3    sorted
     4except NameError:
     5    from django.utils.itercompat import sorted
     6
    17"""
    28>>> from django.utils.datastructures import SortedDict
    39
     
    5056['second-two', 'one']
    5157"""
    5258
    53 # Python 2.3 doesn't have sorted()
    54 try:
    55     sorted
    56 except NameError:
    57     from django.utils.itercompat import sorted
    58 
    59  No newline at end of file
Back to Top