def test_mimetype_set_property() -> None: base_request_response = _BaseRequestResponse(None) base_request_response.mimetype = 'text/html' assert base_request_response.headers[ 'Content-Type'] == 'text/html; charset=utf-8' base_request_response.mimetype = 'application/json' assert base_request_response.headers['Content-Type'] == 'application/json'
def test_mimetype_set_property() -> None: base_request_response = _BaseRequestResponse(None) base_request_response.mimetype = "text/html" assert base_request_response.headers[ "Content-Type"] == "text/html; charset=utf-8" base_request_response.mimetype = "application/json" assert base_request_response.headers["Content-Type"] == "application/json"
def test_mimetype_get_property() -> None: base_request_response = _BaseRequestResponse( {'Content-Type': 'text/html; charset=utf-8'}) assert base_request_response.mimetype == 'text/html' assert base_request_response.mimetype_params == {'charset': 'utf-8'}
def test_mimetype_get_property() -> None: base_request_response = _BaseRequestResponse( {"Content-Type": "text/html; charset=utf-8"}) assert base_request_response.mimetype == "text/html" assert base_request_response.mimetype_params == {"charset": "utf-8"}