Пример #1
0
def get_icon_for_hit(hit):
    if hit["object_type"] == Folder.entity_type:
        return icon_url("folder.png")

    content_type = hit["content_type"]
    icon = icon_for(content_type)
    return icon
Пример #2
0
def get_icon_for_hit(hit):
    if hit["object_type"] == Folder.entity_type:
        return icon_url("folder.png")

    content_type = hit["content_type"]
    icon = icon_for(content_type)
    return icon
Пример #3
0
 def icon(self):
     return icon_for(self.content_type)
Пример #4
0
def test_icon_from_mime_type(app_context):
    icon = icon_for("text/html")
    filename = icon.split("/")[-1]
    assert filename in ("html.png", "htm.png"), icon