class_docstr: Test class for the Folium library.
class_docstr_tok: ["Test","class","for","the","Folium","library","."]
docstr: Test topojson smooth factor method.
docstr_tok: ["Test","topojson","smooth","factor","method","."]
code: def test_topo_json_smooth_factor(self):
      """Test topojson smooth factor method."""
      self.m = folium.Map([43, -100], zoom_start=4)
  
      # Adding TopoJSON as additional layer.
      with open(os.path.join(rootpath, "or_counties_topo.json")) as f:
          choropleth = Choropleth(
              f, topojson="objects.or_counties_geo", smooth_factor=0.5
          ).add_to(self.m)
  
      out = self.m._parent.render()
  
      # Verify TopoJson
      topo_json = choropleth.geojson
      topojson_str = topo_json._template.module.script(topo_json)
      assert "".join(topojson_str.split())[:-1] in "".join(out.split())
  
imports: import json
  import os
  import branca.element
  import geopandas
  import jinja2
  import numpy
  import pandas
  import pytest
  import xyzservices.providers
  from jinja2 import Environment, PackageLoader
  from jinja2.utils import htmlsafe_json_dumps
  import folium
  from folium import TileLayer
  from folium.features import Choropleth, GeoJson
label_desc: Use image node_id 7 for calling the TestFolium obj's underlying member method code with example usage: obj.test_topo_json_smooth_factor() without return types