Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

src/f/l/flanker-0.4.14/tests/mime/message/headers/headers_test.py   flanker(Download)
def headers_parsing_empty_test():
    h = MimeHeaders.from_stream(StringIO(""))
    eq_(0, len(h))
 
def headers_parsing_ridiculously_long_line_test():
def broken_sequences_test():
    headers = StringIO("  hello this is a bad header\nGood: this one is ok")
    headers = MimeHeaders.from_stream(headers)
    eq_(1, len(headers))
    eq_("this one is ok", headers["Good"])
 
 
def bilingual_message_test():
    headers = MimeHeaders.from_stream(StringIO(BILINGUAL))
def headers_roundtrip_test():
    headers = MimeHeaders.from_stream(StringIO(BILINGUAL))
    out = StringIO()
    headers.to_stream(out)
 
    headers2 = MimeHeaders.from_stream(StringIO(out.getvalue()))

src/f/l/flanker-HEAD/tests/mime/message/headers/headers_test.py   flanker(Download)
def headers_parsing_empty_test():
    h = MimeHeaders.from_stream(StringIO(""))
    eq_(0, len(h))
 
def headers_parsing_ridiculously_long_line_test():
def broken_sequences_test():
    headers = StringIO("  hello this is a bad header\nGood: this one is ok")
    headers = MimeHeaders.from_stream(headers)
    eq_(1, len(headers))
    eq_("this one is ok", headers["Good"])
 
 
def bilingual_message_test():
    headers = MimeHeaders.from_stream(StringIO(BILINGUAL))
def headers_roundtrip_test():
    headers = MimeHeaders.from_stream(StringIO(BILINGUAL))
    out = StringIO()
    headers.to_stream(out)
 
    headers2 = MimeHeaders.from_stream(StringIO(out.getvalue()))