MCPcopy
hub / github.com/django/django / test_textfield

Method test_textfield

tests/gis_tests/layermap/tests.py:332–339  ·  view source on GitHub ↗

String content fits also in a TextField

(self)

Source from the content-addressed store, hash-verified

330 lm.save(silent=True, strict=True)
331
332 def test_textfield(self):
333 "String content fits also in a TextField"
334 mapping = copy(city_mapping)
335 mapping["name_txt"] = "Name"
336 lm = LayerMapping(City, city_shp, mapping)
337 lm.save(silent=True, strict=True)
338 self.assertEqual(City.objects.count(), 3)
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"""

Callers

nothing calls this directly

Calls 4

saveMethod · 0.95
LayerMappingClass · 0.90
countMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected