diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-11-26 19:45:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-26 19:45:05 +0100 |
| commit | f091ea35150d95fc6732bbf0c27b971dd445509a (patch) | |
| tree | 254bdd5fee37cacef75eec92614f0e89fa4233ec /tests/inspectdb | |
| parent | 26c2a6ff883a213b4dcadf4411740aff866153ac (diff) | |
Refs #29722 -- Added introspection of materialized views for Oracle.
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/inspectdb')
| -rw-r--r-- | tests/inspectdb/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 6452002c3e..c69eb8e49b 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -310,16 +310,16 @@ class InspectDBTransactionalTests(TransactionTestCase): with connection.cursor() as cursor: cursor.execute('DROP VIEW inspectdb_people_view') - @skipUnless(connection.vendor == 'postgresql', 'PostgreSQL specific SQL') + @skipUnlessDBFeature('can_introspect_materialized_views') def test_include_materialized_views(self): - """inspectdb --include-views creates models for database materialized views.""" + """inspectdb --include-views creates models for materialized views.""" with connection.cursor() as cursor: cursor.execute( - 'CREATE MATERIALIZED VIEW inspectdb_people_materialized_view AS ' + 'CREATE MATERIALIZED VIEW inspectdb_people_materialized AS ' 'SELECT id, name FROM inspectdb_people' ) out = StringIO() - view_model = 'class InspectdbPeopleMaterializedView(models.Model):' + view_model = 'class InspectdbPeopleMaterialized(models.Model):' view_managed = 'managed = False # Created from a view.' try: call_command('inspectdb', table_name_filter=inspectdb_tables_only, stdout=out) @@ -332,7 +332,7 @@ class InspectDBTransactionalTests(TransactionTestCase): self.assertIn(view_managed, with_views_output) finally: with connection.cursor() as cursor: - cursor.execute('DROP MATERIALIZED VIEW IF EXISTS inspectdb_people_materialized_view') + cursor.execute('DROP MATERIALIZED VIEW inspectdb_people_materialized') @skipUnless(connection.vendor == 'postgresql', 'PostgreSQL specific SQL') @skipUnlessDBFeature('supports_table_partitions') |
