The ProjectState render method doesn't raise an ImproperlyConfigured exception about unique labels if two dotted app names have the same last part.
(self)
| 578 | project_state.apps |
| 579 | |
| 580 | def test_render_unique_app_labels(self): |
| 581 | """ |
| 582 | The ProjectState render method doesn't raise an |
| 583 | ImproperlyConfigured exception about unique labels if two dotted app |
| 584 | names have the same last part. |
| 585 | """ |
| 586 | |
| 587 | class A(models.Model): |
| 588 | class Meta: |
| 589 | app_label = "django.contrib.auth" |
| 590 | |
| 591 | class B(models.Model): |
| 592 | class Meta: |
| 593 | app_label = "vendor.auth" |
| 594 | |
| 595 | # Make a ProjectState and render it |
| 596 | project_state = ProjectState() |
| 597 | project_state.add_model(ModelState.from_model(A)) |
| 598 | project_state.add_model(ModelState.from_model(B)) |
| 599 | self.assertEqual(len(project_state.apps.get_models()), 2) |
| 600 | |
| 601 | def test_reload_related_model_on_non_relational_fields(self): |
| 602 | """ |
nothing calls this directly
no test coverage detected