diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migrations/test_operations.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index e859b62a10..90c22bc73b 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -5543,6 +5543,10 @@ class OperationTests(OperationTestBase): elidable_operation = migrations.RunSQL("SELECT 1 FROM void;", elidable=True) self.assertEqual(elidable_operation.reduce(operation, []), [operation]) + # Test elidable deconstruction + definition = elidable_operation.deconstruct() + self.assertIs(definition[2]["elidable"], True) + def test_run_sql_params(self): """ #23426 - RunSQL should accept parameters. @@ -5796,6 +5800,10 @@ class OperationTests(OperationTestBase): elidable_operation = migrations.RunPython(inner_method, elidable=True) self.assertEqual(elidable_operation.reduce(operation, []), [operation]) + # Test elidable deconstruction + definition = elidable_operation.deconstruct() + self.assertIs(definition[2]["elidable"], True) + def test_run_python_invalid_reverse_code(self): msg = "RunPython must be supplied with callable arguments" with self.assertRaisesMessage(ValueError, msg): |
