Exemple #1
0
def test_accept_mixedcase():
    """3.7 Media Types
           [...]
           The type, subtype, and parameter attribute names are case-
           insensitive."""
    mimeaccept = MIMEAccept('text/HtMl')
    assert mimeaccept.accept_html()
Exemple #2
0
def test_accept_html():
    mimeaccept = MIMEAccept('image/jpg')
    assert not mimeaccept.accept_html()
    mimeaccept = MIMEAccept('image/jpg, text/html')
    assert mimeaccept.accept_html()
def test_accept_html():
    mimeaccept = MIMEAccept('Content-Type', 'image/jpg')
    assert not mimeaccept.accept_html()
    mimeaccept = MIMEAccept('Content-Type', 'image/jpg, text/html')
    assert mimeaccept.accept_html()
Exemple #4
0
def test_accept_html():
    mimeaccept = MIMEAccept("image/jpg")
    assert not mimeaccept.accept_html()
    mimeaccept = MIMEAccept("image/jpg, text/html")
    assert mimeaccept.accept_html()