summaryrefslogtreecommitdiff
path: root/tests/inspectdb/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/inspectdb/tests.py')
-rw-r--r--tests/inspectdb/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py
index 8c544c58c3..db9e36c5f6 100644
--- a/tests/inspectdb/tests.py
+++ b/tests/inspectdb/tests.py
@@ -637,3 +637,8 @@ class InspectDBTransactionalTests(TransactionTestCase):
)
self.assertIn(f"column_1 = models.{field_type}()", output)
self.assertIn(f"column_2 = models.{field_type}()", output)
+
+ def test_composite_primary_key_not_unique_together(self):
+ out = StringIO()
+ call_command("inspectdb", "inspectdb_compositeprimarykeymodel", stdout=out)
+ self.assertNotIn("unique_together", out.getvalue())