diff --git a/tests/regressiontests/model_regress/tests.py b/tests/regressiontests/model_regress/tests.py
index 07ad8fa..60aa4da 100644
a
|
b
|
from __future__ import absolute_import
|
2 | 2 | |
3 | 3 | import datetime |
4 | 4 | from operator import attrgetter |
| 5 | import sys |
5 | 6 | |
6 | 7 | from django.core.exceptions import ValidationError |
7 | 8 | from django.test import TestCase, skipUnlessDBFeature |
8 | | from django.utils import tzinfo |
| 9 | from django.utils import tzinfo, unittest |
9 | 10 | |
10 | 11 | from .models import (Worker, Article, Party, Event, Department, |
11 | 12 | BrokenUnicodeMethod, NonAutoPK) |
… |
… |
class ModelTests(TestCase):
|
141 | 142 | w = Worker.objects.create(department=d, name="Full-time") |
142 | 143 | self.assertEqual(unicode(w), "Full-time") |
143 | 144 | |
| 145 | @unittest.skipIf(sys.getdefaultencoding() != 'ascii', |
| 146 | "Default system encoding is not ascii") |
144 | 147 | def test_broken_unicode(self): |
145 | 148 | # Models with broken unicode methods should still have a printable repr |
146 | 149 | b = BrokenUnicodeMethod.objects.create(name="Jerry") |