mirror of
https://github.com/django/django.git
synced 2025-05-13 10:26:32 +00:00
Tests regression in 4c75858135589f3a00e32eb4d476074536371a32.
This commit is contained in:
parent
1fb3f57e81
commit
dd133054cb
@ -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()
|
||||
|
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user