diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-07-22 08:47:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-22 08:47:55 +0200 |
| commit | 5a017eef4ccf8c4818d85d3c8e7451998f921356 (patch) | |
| tree | d4938ed4b55cab9bc110daede8c14c4cf6d33171 | |
| parent | 1a28dc3887e8d66d5e3ff08cf7fb0a6212b873e5 (diff) | |
Fixed test_migrate_syncdb_deferred_sql_executed_with_schemaeditor() on Oracle.
| -rw-r--r-- | tests/migrations/test_commands.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index 377490370b..8276049dc6 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -11,6 +11,7 @@ from django.db import ( ConnectionHandler, DatabaseError, connection, connections, models, ) from django.db.backends.base.schema import BaseDatabaseSchemaEditor +from django.db.backends.utils import truncate_name from django.db.migrations.exceptions import InconsistentMigrationHistory from django.db.migrations.recorder import MigrationRecorder from django.test import TestCase, override_settings @@ -592,7 +593,8 @@ class MigrateTests(MigrationTestBase): stdout = stdout.getvalue() self.assertIn('Synchronize unmigrated apps: unmigrated_app_syncdb', stdout) self.assertIn('Creating tables...', stdout) - self.assertIn('Creating table unmigrated_app_syncdb_classroom', stdout) + table_name = truncate_name('unmigrated_app_syncdb_classroom', connection.ops.max_name_length()) + self.assertIn('Creating table %s' % table_name, stdout) @override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed"}) def test_migrate_record_replaced(self): |
