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()
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()
def test_accept_html(): mimeaccept = MIMEAccept("image/jpg") assert not mimeaccept.accept_html() mimeaccept = MIMEAccept("image/jpg, text/html") assert mimeaccept.accept_html()