0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Remove u prefixes, skip test unless spatial db.

Refs #22001, d22b291890
This commit is contained in:
Marc Tamlyn 2014-03-15 12:47:32 +00:00
parent 659b5678fc
commit 834d78ffc3
2 changed files with 7 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Neighborhood',
fields=[
(u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.TextField(unique=True)),
('geom', django.contrib.gis.db.models.fields.MultiPolygonField(srid=4326, null=True)),
],
@ -20,8 +20,8 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Household',
fields=[
(u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=True, primary_key=True)),
('neighborhood', models.ForeignKey(to='gis.Neighborhood', to_field=u'id', null=True)),
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('neighborhood', models.ForeignKey(to='gis.Neighborhood', to_field='id', null=True)),
('address', models.TextField()),
('zip_code', models.IntegerField(null=True, blank=True)),
('geom', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, geography=True)),

View File

@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import skipUnless
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
from django.core.management import call_command
from django.db import connection
from django.test import override_settings, override_system_checks, TransactionTestCase
@ -24,6 +26,7 @@ class MigrateTests(TransactionTestCase):
with connection.cursor() as cursor:
self.assertNotIn(table, connection.introspection.get_table_list(cursor))
@skipUnless(HAS_SPATIAL_DB, "Spatial db is required.")
@override_system_checks([])
@override_settings(MIGRATION_MODULES={"gis": "django.contrib.gis.tests.migrations.migrations"})
def test_migrate_gis(self):