From dd133054cb98f77577c06d7ef1f2391a865784bc Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 6 May 2025 08:20:56 +0200 Subject: [PATCH] Refs #36052, #32234 -- Fixed inspectdb tests for CompositePrimaryKey on Oracle. Tests regression in 4c75858135589f3a00e32eb4d476074536371a32. --- tests/inspectdb/models.py | 2 +- tests/inspectdb/tests.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/inspectdb/models.py b/tests/inspectdb/models.py index 83477276c9..515a6cd207 100644 --- a/tests/inspectdb/models.py +++ b/tests/inspectdb/models.py @@ -157,7 +157,7 @@ class DbComment(models.Model): required_db_features = {"supports_comments"} -class CompositePrimaryKeyModel(models.Model): +class CompositePKModel(models.Model): pk = models.CompositePrimaryKey("column_1", "column_2") column_1 = models.IntegerField() column_2 = models.IntegerField() diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index db9e36c5f6..35cabd346f 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -629,7 +629,7 @@ class InspectDBTransactionalTests(TransactionTestCase): def test_composite_primary_key(self): out = StringIO() field_type = connection.features.introspected_field_types["IntegerField"] - call_command("inspectdb", "inspectdb_compositeprimarykeymodel", stdout=out) + call_command("inspectdb", "inspectdb_compositepkmodel", stdout=out) output = out.getvalue() self.assertIn( "pk = models.CompositePrimaryKey('column_1', 'column_2')", @@ -640,5 +640,5 @@ class InspectDBTransactionalTests(TransactionTestCase): def test_composite_primary_key_not_unique_together(self): out = StringIO() - call_command("inspectdb", "inspectdb_compositeprimarykeymodel", stdout=out) + call_command("inspectdb", "inspectdb_compositepkmodel", stdout=out) self.assertNotIn("unique_together", out.getvalue())