def METHOD_NAME(self):
    result = run_cli(
        path.join("tests", "deploy", "inventories", "inventory.py"),
        "fact",
        "server.NotAFact",
    )
    assert result.exit_code == 1, result.stdout
    assert "No such attribute in module pyinfra.facts.server: NotAFact" in result.stdout