From f091ea35150d95fc6732bbf0c27b971dd445509a Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 26 Nov 2018 19:45:05 +0100 Subject: Refs #29722 -- Added introspection of materialized views for Oracle. Thanks Tim Graham for the review. --- tests/inspectdb/tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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') -- cgit v1.3