mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Tests regression in 4c75858135.
			
			
This commit is contained in:
		| @@ -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()) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user