MCPcopy
hub / github.com/django/django / __getitem__

Method __getitem__

tests/template_tests/utils.py:121–126  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

119 raise TypeError
120
121 def __getitem__(self, key):
122 if key == "silent_fail_key":
123 raise SomeException
124 elif key == "noisy_fail_key":
125 raise SomeOtherException
126 raise KeyError
127
128 @property
129 def silent_fail_attribute(self):

Callers 14

test_multipointsMethod · 0.45
test_linestringMethod · 0.45
test_multilinestringMethod · 0.45
test_polygonsMethod · 0.45
test_multipolygonsMethod · 0.45
test_emptyCollectionsMethod · 0.45
test_linestringMethod · 0.45
test_multilinestringMethod · 0.45
test_polygonsMethod · 0.45
test_multipolygonsMethod · 0.45
test03a_layersMethod · 0.45
test_missing_keyMethod · 0.45

Calls

no outgoing calls

Tested by 14

test_multipointsMethod · 0.36
test_linestringMethod · 0.36
test_multilinestringMethod · 0.36
test_polygonsMethod · 0.36
test_multipolygonsMethod · 0.36
test_emptyCollectionsMethod · 0.36
test_linestringMethod · 0.36
test_multilinestringMethod · 0.36
test_polygonsMethod · 0.36
test_multipolygonsMethod · 0.36
test03a_layersMethod · 0.36
test_missing_keyMethod · 0.36