Ticket #11420: patch-11420.diff

File patch-11420.diff, 860 bytes (added by Richard Barran, 15 years ago)
  • regressiontests/model_regress/models.py

     
    11# coding: utf-8
    22import datetime
     3import sys
    34
    45from django.conf import settings
    56from django.db import models
     
    141142>>> w
    142143<Worker: Full-time>
    143144
     145"""}
     146
     147if sys.getdefaultencoding() == 'ascii':
     148    __test__["encoding-tests"] = """
    144149# Models with broken unicode methods should still have a printable repr
    145150>>> b = BrokenUnicodeMethod(name="Jerry")
    146151>>> b.save()
    147152>>> BrokenUnicodeMethod.objects.all()
    148153[<BrokenUnicodeMethod: [Bad Unicode data]>]
    149154
    150 """}
     155"""
    151156
    152157if settings.DATABASE_ENGINE not in ("mysql", "oracle"):
    153158    __test__["timezone-tests"] = """
Back to Top