MCPcopy
hub / github.com/django/django / test_not_found

Method test_not_found

tests/gis_tests/test_geoip2.py:179–188  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

177 )
178
179 def test_not_found(self):
180 g1 = GeoIP2(city="<invalid>")
181 g2 = GeoIP2(country="<invalid>")
182 for function, query in itertools.product(
183 (g1.country, g2.city), ("127.0.0.1", "::1")
184 ):
185 with self.subTest(function=function.__qualname__, query=query):
186 msg = f"The address {query} is not in the database."
187 with self.assertRaisesMessage(geoip2.errors.AddressNotFoundError, msg):
188 function(query)
189
190 def test_del(self):
191 g = GeoIP2()

Callers

nothing calls this directly

Calls 3

GeoIP2Class · 0.90
functionFunction · 0.85
assertRaisesMessageMethod · 0.80

Tested by

no test coverage detected