summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2025-05-06 08:20:56 +0200
committerGitHub <noreply@github.com>2025-05-06 08:20:56 +0200
commitdd133054cb98f77577c06d7ef1f2391a865784bc (patch)
tree66d67dd330a5cafc14962c832ac89cc107b294e0
parent1fb3f57e81239a75eb8f873b392e11534c041fdc (diff)
Refs #36052, #32234 -- Fixed inspectdb tests for CompositePrimaryKey on Oracle.
Tests regression in 4c75858135589f3a00e32eb4d476074536371a32.
-rw-r--r--tests/inspectdb/models.py2
-rw-r--r--tests/inspectdb/tests.py4
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())