summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-02-02 12:46:28 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-02-02 12:46:28 -0800
commit788cde326ae3c7bf37f98432c2994d1fb94fa41e (patch)
tree57fbb188492404ec68620e1d655a28f0b7b2dd1d
parent5616234d4d7b28ee807df89f4f817f080ac57d36 (diff)
parentad913f242d6b3de3d188d5a28977e33b14bcda16 (diff)
Merge pull request #2230 from manfre/patch-2
Fix regress added to migrations.test_operations.test_alter_field_pk_fk
-rw-r--r--tests/migrations/test_operations.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
index 375a9ccc54..01f78b62b5 100644
--- a/tests/migrations/test_operations.py
+++ b/tests/migrations/test_operations.py
@@ -349,11 +349,12 @@ class OperationTests(MigrationTestBase):
self.assertIsInstance(project_state.models["test_alflpkfk", "pony"].get_field_by_name("id"), models.AutoField)
self.assertIsInstance(new_state.models["test_alflpkfk", "pony"].get_field_by_name("id"), models.FloatField)
- def assertIdTypeEqualsFkType(self):
+ def assertIdTypeEqualsFkType():
with connection.cursor() as cursor:
id_type = [c.type_code for c in connection.introspection.get_table_description(cursor, "test_alflpkfk_pony") if c.name == "id"][0]
fk_type = [c.type_code for c in connection.introspection.get_table_description(cursor, "test_alflpkfk_rider") if c.name == "pony_id"][0]
self.assertEqual(id_type, fk_type)
+
assertIdTypeEqualsFkType()
# Test the database alteration
with connection.schema_editor() as editor: