MCPcopy
hub / github.com/django/django / test_polygons_templates

Method test_polygons_templates

tests/gis_tests/geos_tests/test_geos.py:705–711  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

703 )
704
705 def test_polygons_templates(self):
706 # Accessing Polygon attributes in templates should work.
707 engine = Engine()
708 template = engine.from_string("{{ polygons.0.wkt }}")
709 polygons = [fromstr(p.wkt) for p in self.geometries.multipolygons[:2]]
710 content = template.render(Context({"polygons": polygons}))
711 self.assertIn("MULTIPOLYGON (((100", content)
712
713 def test_polygon_comparison(self):
714 p1 = Polygon(((0, 0), (0, 1), (1, 1), (1, 0), (0, 0)))

Callers

nothing calls this directly

Calls 5

from_stringMethod · 0.95
EngineClass · 0.90
fromstrFunction · 0.90
ContextClass · 0.90
renderMethod · 0.45

Tested by

no test coverage detected