def METHOD_NAME(app):
    """Test template filter."""
    assert render_template_string(
        r"{% set t = upload_type|objecttype %}{{ t.title.en }}",
        upload_type=dict(type="publication", subtype="book")) == "Book"
    assert render_template_string(
        r"{% set t = upload_type|objecttype %}{{ t.title.en }}",
        upload_type=dict(type="publication")) == "Publication"
    assert render_template_string(
        r"{% set t = upload_type|objecttype %}{{ t }}",
        upload_type="") == "None"