def METHOD_NAME(self):
    with open(self.network_file, "w") as f:
        f.write("# some other content\n")
    self.assertIsNone(self.instance.get_permanent_hostname())
    self.module.fail_json.assert_called_with(
        "Unable to locate HOSTNAME entry in %s" % self.network_file
    )