def setUp(self):
        super(SimpleInstanceTest, self).setUp()
        db_info = DBInstance(
            InstanceTasks.BUILDING, name="TestInstance")
        self.instance = SimpleInstance(
            None, db_info, InstanceServiceStatus(
                ServiceStatuses.BUILDING), ds_version=Mock(), ds=Mock())
        db_info.addresses = {"private": [{"addr": "123.123.123.123"}],
                             "internal": [{"addr": "10.123.123.123"}],
                             "public": [{"addr": "15.123.123.123"}]}
        self.orig_conf = CONF.network_label_regex
        self.orig_ip_regex = CONF.ip_regex
        self.orig_black_list_regex = CONF.black_list_regex
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("day", help="The day of the results, with format yyyymmdd")
    args = parser.parse_args()
    install_autopkgtest_results_formatter()
    with tempfile.TemporaryDirectory(dir=os.environ.get("HOME")) as temp_dir:
        clone_results_repo(temp_dir)
        format_results(temp_dir, ACTIVE_DISTROS, args.day)
        commit_and_push(temp_dir, args.day)