MCPcopy
hub / github.com/django/django / test_related_objects_local

Method test_related_objects_local

tests/model_meta/tests.py:127–138  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

125 )
126
127 def test_related_objects_local(self):
128 result_key = "get_all_related_objects_with_model_local"
129 for model, expected in TEST_RESULTS[result_key].items():
130 objects = [
131 (field, self._model(model, field))
132 for field in model._meta.get_fields(include_parents=False)
133 if field.auto_created and not field.concrete
134 ]
135 self.assertEqual(
136 sorted(self._map_related_query_names(objects), key=self.key_name),
137 sorted(expected, key=self.key_name),
138 )
139
140 def test_related_objects_include_hidden(self):
141 result_key = "get_all_related_objects_with_model_hidden"

Callers

nothing calls this directly

Calls 4

_modelMethod · 0.80
itemsMethod · 0.45
get_fieldsMethod · 0.45

Tested by

no test coverage detected