def METHOD_NAME(self):
    """outputs json to file based on inputs of
    path, headings and beautiful_soup rows
    """
    mockpath = "{0}/mock_life.json".format(self.tempdir)
    sample_json_results = {
        "0": {
            "female_life_expectancy": "80.94",
            "male_life_expectancy": "76.10",
        },
        "57": {
            "female_life_expectancy": "26.91",
            "male_life_expectancy": "23.69",
        },
        "99": {
            "female_life_expectancy": "2.60",
            "male_life_expectancy": "2.22",
        },
    }
    with open(self.life_page, "r") as f:
        mockpage = f.read()
    table = bs(mockpage, "html.parser").find("table").find("table")
    rows = table.findAll("tr")[2:]
    output_json(mockpath, self.life_headings, rows)
    self.assertTrue(os.path.isfile(mockpath))
    with open(mockpath, "r") as f:
        data = json.loads(f.read())
    self.assertEqual(type(data), dict)
    for key in data["0"].keys():
        self.assertTrue(key in self.life_headings)
    for age in sample_json_results:
        for key in sample_json_results[age]:
            self.assertEqual(sample_json_results[age][key], data[age][key])