(self)
| 163 | self.assertEqual(normalize_choices(Medal), expected) |
| 164 | |
| 165 | def test_callable(self): |
| 166 | def get_choices(): |
| 167 | return { |
| 168 | "C": _("Club"), |
| 169 | "D": _("Diamond"), |
| 170 | "H": _("Heart"), |
| 171 | "S": _("Spade"), |
| 172 | } |
| 173 | |
| 174 | get_choices_spy = mock.Mock(wraps=get_choices) |
| 175 | output = normalize_choices(get_choices_spy) |
| 176 | |
| 177 | get_choices_spy.assert_not_called() |
| 178 | self.assertIsInstance(output, CallableChoiceIterator) |
| 179 | self.assertEqual(output, self.expected) |
| 180 | get_choices_spy.assert_called_once() |
| 181 | |
| 182 | def test_mapping(self): |
| 183 | choices = { |
nothing calls this directly
no test coverage detected