MCPcopy
hub / github.com/django/django / test_immutable_basic_operations

Method test_immutable_basic_operations

tests/httpwrappers/tests.py:62–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 self.assertEqual(q.get("foo", "default"), "default")
61
62 def test_immutable_basic_operations(self):
63 q = QueryDict()
64 self.assertEqual(q.getlist("foo"), [])
65 self.assertNotIn("foo", q)
66 self.assertEqual(list(q), [])
67 self.assertEqual(list(q.items()), [])
68 self.assertEqual(list(q.lists()), [])
69 self.assertEqual(list(q.keys()), [])
70 self.assertEqual(list(q.values()), [])
71 self.assertEqual(len(q), 0)
72 self.assertEqual(q.urlencode(), "")
73
74 def test_single_key_value(self):
75 """Test QueryDict with one key/value pair"""

Callers

nothing calls this directly

Calls 7

urlencodeMethod · 0.95
QueryDictClass · 0.90
listsMethod · 0.80
getlistMethod · 0.45
itemsMethod · 0.45
keysMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected