MCPcopy
hub / github.com/django/django / test_no_database_file

Method test_no_database_file

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

Source from the content-addressed store, hash-verified

95 GeoIP2(bad, GeoIP2.MODE_AUTO)
96
97 def test_no_database_file(self):
98 invalid_path = pathlib.Path(__file__).parent.joinpath("data/invalid").resolve()
99 msg = "Path must be a valid database or directory containing databases."
100 with self.assertRaisesMessage(GeoIP2Exception, msg):
101 GeoIP2(invalid_path)
102
103 def test_bad_query(self):
104 g = GeoIP2(city="<invalid>")

Callers

nothing calls this directly

Calls 3

GeoIP2Class · 0.90
assertRaisesMessageMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected