'Create a polygon to cover the world and make sure it is "similar" (clip on)'

def test_polygon_topojson(self):

    self.defineGeometry('POLYGON')
    geom = Polygon([((-180), (-85.0511)), (180, (-85.0511)), (180, 85.0511), ((-180), 85.0511), ((-180), (-85.0511))])
    self.insertTestRow(geom.wkt)
    (tile_mimetype, tile_content) = utils.request(self.config_file_content, 'vectile_test', 'topojson', 0, 0, 0)
    self.assertTrue(tile_mimetype.endswith('/json'))
    topojson_result = json.loads(tile_content.decode('utf8'))
    topojson_xform = get_topo_transform(topojson_result)
    parts = [topojson_result['arcs'][arc[0]] for arc in topojson_result['objects']['vectile']['geometries'][0]['arcs']]
    parts = [map(topojson_xform, topojson_dediff(part)) for part in parts]
    result_geom = Polygon(*parts)
    expected_geom = Polygon([((-180), (-85.0511)), (180, (-85.0511)), (180, 85.0511), ((-180), 85.0511), ((-180), (-85.0511))])
    self.assertTrue(result_geom.difference(expected_geom.buffer(1)).is_empty)
    self.assertTrue(expected_geom.difference(result_geom.buffer(1)).is_empty)
