def METHOD_NAME(self) -> None:
    self.generate_config()
    with open(self.config_file) as f:
        raw = yaml.safe_load(f)
    self.assertIn("macaroon_secret_key", raw)
    config = HomeServerConfig.load_config("", ["-c", self.config_file])
    self.assertTrue(
        hasattr(config.key, "macaroon_secret_key"),
        "Want config to have attr macaroon_secret_key",
    )
    if len(config.key.macaroon_secret_key) < 5:
        self.fail(
            "Want macaroon secret key to be string of at least length 5,"
            "was: %r" % (config.key.macaroon_secret_key,)
        )
    config2 = HomeServerConfig.load_or_generate_config("", ["-c", self.config_file])
    assert config2 is not None
    self.assertTrue(
        hasattr(config2.key, "macaroon_secret_key"),
        "Want config to have attr macaroon_secret_key",
    )
    if len(config2.key.macaroon_secret_key) < 5:
        self.fail(
            "Want macaroon secret key to be string of at least length 5,"
            "was: %r" % (config2.key.macaroon_secret_key,)
        )