def METHOD_NAME(capsys: Any, config_file_contents, message_part) -> None:
    with write_to_file(config_file_contents, suffix=".toml") as filename:
        with pytest.raises(SystemExit, match="2"):
            DjangoPluginConfig(filename)
    error_message = "usage: " + TEMPLATE_TOML.format(message_part)
    assert error_message == capsys.readouterr().err