mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Removed the only_installed argument of Apps.get_models.
Refs #15903, #15866, #15850.
This commit is contained in:
parent
ba7206cd81
commit
9f13c33281
4 changed files with 15 additions and 42 deletions
|
@ -82,16 +82,3 @@ class GetModelsTest(TestCase):
|
|||
|
||||
def test_get_models_with_app_label_only_returns_installed_models(self):
|
||||
self.assertEqual(apps.get_models(self.not_installed_module), [])
|
||||
|
||||
def test_get_models_with_not_installed(self):
|
||||
self.assertIn(
|
||||
"NotInstalledModel",
|
||||
[m.__name__ for m in apps.get_models(only_installed=False)])
|
||||
|
||||
|
||||
class NotInstalledModelsTest(TestCase):
|
||||
def test_related_not_installed_model(self):
|
||||
from .not_installed.models import NotInstalledModel
|
||||
self.assertEqual(
|
||||
set(NotInstalledModel._meta.get_all_field_names()),
|
||||
set(["id", "relatedmodel", "m2mrelatedmodel"]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue