def METHOD_NAME():
    """
    Test cert state fetching a new certificate. (test=True)
    """
    # With test=True
    with patch.dict(
        acme.__salt__,
        {
            "acme.has": MagicMock(return_value=False),
            "acme.info": MagicMock(return_value={"foo": "bar"}),
        },
    ), patch.dict(acme.__opts__, {"test": True}):
        match = {
            "name": "test",
            "result": None,
            "comment": ["Certificate test would have been obtained."],
            "changes": {"old": "current certificate", "new": "new certificate"},
        }
        assert acme.cert("test") == match
        assert acme.cert("testing.example.com", certname="test") == match