Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed test failure on Oracle

Failure was introduced with test in [19e5cd7]
  • Loading branch information...
commit de220fb85ef0cc1451cdfaa2a29f5f0c9f798e98 1 parent 83ab04c
@shaib shaib authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 tests/schema/tests.py
View
7 tests/schema/tests.py
@@ -674,8 +674,11 @@ def test_foreign_key_index_long_names_regression(self):
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),
)
Please sign in to comment.
Something went wrong with that request. Please try again.