MCPcopy
hub / github.com/django/django / IterableWithStr

Class IterableWithStr

tests/utils_tests/test_http.py:48–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47 def test_custom_iterable_not_doseq(self):
48 class IterableWithStr:
49 def __str__(self):
50 return "custom"
51
52 def __iter__(self):
53 yield from range(0, 3)
54
55 self.assertEqual(urlencode({"a": IterableWithStr()}, doseq=False), "a=custom")
56

Callers 1

Calls

no outgoing calls

Tested by 1