summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShai Berger <shai@platonix.com>2013-11-25 15:11:50 +0200
committerShai Berger <shai@platonix.com>2013-11-25 15:11:50 +0200
commitde220fb85ef0cc1451cdfaa2a29f5f0c9f798e98 (patch)
tree106c0fea3d07dff9026efe6c26387d72376a40dd
parent83ab04c6d6a65c78cac32e5796908c6a542c85c7 (diff)
Fixed test failure on Oracle
Failure was introduced with test in [19e5cd77f0536b778b00788e34d8199835143855]
-rw-r--r--tests/schema/tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index de339132bc..d49c291263 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -674,8 +674,11 @@ class SchemaTests(TransactionTestCase):
with connection.schema_editor() as editor:
editor.create_model(Author)
editor.create_model(BookWithLongName)
- # Ensure the table is there and has the right index
+ # Find the properly shortened column name
+ column_name = connection.ops.quote_name("author_foreign_key_with_really_long_field_name_id")
+ column_name = column_name[1:-1].lower() # unquote, and, for Oracle, un-upcase
+ # Ensure the table is there and has an index on the column
self.assertIn(
- "author_foreign_key_with_really_long_field_name_id",
+ column_name,
connection.introspection.get_indexes(connection.cursor(), BookWithLongName._meta.db_table),
)