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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/f/l/flanker-0.4.14/tests/mime/message/part_test.py   flanker(Download)
from contextlib import closing
from cStringIO import StringIO
from flanker.mime.message.part import encode_transfer_encoding
 
from ... import *
def test_encode_transfer_encoding():
    body = "long line " * 100
    encoded_body = encode_transfer_encoding('base64', body)
    # according to  RFC 5322 line "SHOULD be no more than 78 characters"
    assert_less(max([len(l) for l in encoded_body.splitlines()]), 79)

src/f/l/flanker-HEAD/tests/mime/message/part_test.py   flanker(Download)
from contextlib import closing
from cStringIO import StringIO
from flanker.mime.message.part import encode_transfer_encoding
 
from ... import *
def test_encode_transfer_encoding():
    body = "long line " * 100
    encoded_body = encode_transfer_encoding('base64', body)
    # according to  RFC 5322 line "SHOULD be no more than 78 characters"
    assert_less(max([len(l) for l in encoded_body.splitlines()]), 79)