diff --git a/tests/regressiontests/inspectdb/models.py b/tests/regressiontests/inspectdb/models.py
index 4a66214..1966c46 100644
a
|
b
|
|
| 1 | # -*- encoding: utf-8 -*- |
| 2 | from __future__ import unicode_literals |
| 3 | |
1 | 4 | from django.db import models |
2 | 5 | |
3 | 6 | |
… |
… |
class SpecialColumnName(models.Model):
|
28 | 31 | field_field_2 = models.IntegerField(db_column='__field') |
29 | 32 | # Other chars |
30 | 33 | prc_x = models.IntegerField(db_column='prc(%) x') |
| 34 | non_ascii = models.IntegerField(db_column='tamaño') |
diff --git a/tests/regressiontests/inspectdb/tests.py b/tests/regressiontests/inspectdb/tests.py
index 484e7f4..5956231 100644
a
|
b
|
|
| 1 | # -*- encoding: utf-8 -*- |
1 | 2 | from __future__ import unicode_literals |
2 | 3 | |
3 | 4 | from django.core.management import call_command |
4 | 5 | from django.test import TestCase, skipUnlessDBFeature |
5 | | from django.utils.six import StringIO |
| 6 | from django.utils.six import PY3, StringIO |
6 | 7 | |
7 | 8 | |
8 | 9 | class InspectDBTestCase(TestCase): |
… |
… |
class InspectDBTestCase(TestCase):
|
71 | 72 | self.assertIn("field_field_0 = models.IntegerField(db_column='Field__')", output) |
72 | 73 | self.assertIn("field_field_1 = models.IntegerField(db_column='__field')", output) |
73 | 74 | self.assertIn("prc_x = models.IntegerField(db_column='prc(%) x')", output) |
| 75 | if PY3: |
| 76 | # Python 3 allows non-ascii identifiers |
| 77 | self.assertIn("tamaño = models.IntegerField()", output) |
| 78 | else: |
| 79 | self.assertIn("tama_o = models.IntegerField(db_column='tama\\xf1o')", output) |