MCPcopy
hub / github.com/django/django / test_iterator

Method test_iterator

tests/utils_tests/test_choices.py:200–208  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

198 self.assertEqual(normalize_choices(choices), self.expected)
199
200 def test_iterator(self):
201 def generator():
202 yield "C", _("Club")
203 yield "D", _("Diamond")
204 yield "H", _("Heart")
205 yield "S", _("Spade")
206
207 choices = generator()
208 self.assertEqual(normalize_choices(choices), self.expected)
209
210 def test_nested_callable(self):
211 def get_audio_choices():

Callers

nothing calls this directly

Calls 1

normalize_choicesFunction · 0.90

Tested by

no test coverage detected