summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2020-06-02 23:18:15 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-03 07:02:48 +0200
commit22a59c01c00cf9fbefaee0e8e67fab82bbaf1fd2 (patch)
tree03d01a775b5535fda32831dbf83ae25a4dfbc902 /tests/postgres_tests
parent06c8565a4650b359bdfa59f9707eaa0d1dfd7223 (diff)
Refs #31615 -- Added EXISTS clauses to extension operations.
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_operations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/postgres_tests/test_operations.py b/tests/postgres_tests/test_operations.py
index a10f5da440..114c141a61 100644
--- a/tests/postgres_tests/test_operations.py
+++ b/tests/postgres_tests/test_operations.py
@@ -183,13 +183,13 @@ class CreateExtensionTests(PostgreSQLTestCase):
with connection.schema_editor(atomic=False) as editor:
operation.database_forwards(self.app_label, editor, project_state, new_state)
self.assertEqual(len(captured_queries), 4)
- self.assertIn('CREATE EXTENSION', captured_queries[1]['sql'])
+ self.assertIn('CREATE EXTENSION IF NOT EXISTS', captured_queries[1]['sql'])
# Reversal.
with CaptureQueriesContext(connection) as captured_queries:
with connection.schema_editor(atomic=False) as editor:
operation.database_backwards(self.app_label, editor, new_state, project_state)
self.assertEqual(len(captured_queries), 2)
- self.assertIn('DROP EXTENSION', captured_queries[1]['sql'])
+ self.assertIn('DROP EXTENSION IF EXISTS', captured_queries[1]['sql'])
def test_create_existing_extension(self):
operation = BloomExtension()