MCPcopy
hub / github.com/django/django / test_encoded_name

Method test_encoded_name

tests/gis_tests/layermap/tests.py:341–347  ·  view source on GitHub ↗

Test a layer containing utf-8-encoded name

(self)

Source from the content-addressed store, hash-verified

339 self.assertEqual(City.objects.get(name="Houston").name_txt, "Houston")
340
341 def test_encoded_name(self):
342 """Test a layer containing utf-8-encoded name"""
343 city_shp = shp_path / "ch-city" / "ch-city.shp"
344 lm = LayerMapping(City, city_shp, city_mapping)
345 lm.save(silent=True, strict=True)
346 self.assertEqual(City.objects.count(), 1)
347 self.assertEqual(City.objects.all()[0].name, "Zürich")
348
349 def test_null_geom_with_unique(self):
350 """LayerMapping may be created with a unique and a null geometry."""

Callers

nothing calls this directly

Calls 4

saveMethod · 0.95
LayerMappingClass · 0.90
countMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected