MCPcopy
hub / github.com/django/django / test_flatten_context

Method test_flatten_context

tests/template_tests/test_context.py:134–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

132 self.assertIsNone(test_context.get("fruit"))
133
134 def test_flatten_context(self):
135 a = Context()
136 a.update({"a": 2})
137 a.update({"b": 4})
138 a.update({"c": 8})
139
140 self.assertEqual(
141 a.flatten(),
142 {"False": False, "None": None, "True": True, "a": 2, "b": 4, "c": 8},
143 )
144
145 def test_flatten_context_with_context(self):
146 """

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
ContextClass · 0.90
flattenMethod · 0.45

Tested by

no test coverage detected