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

All Samples(28)  |  Call(26)  |  Derive(0)  |  Import(2)

src/f/l/flanker-0.4.14/flanker/mime/__init__.py   flanker(Download)
from flanker.mime import create
from flanker.mime.create import from_string
from flanker.mime.message.fallback.create import from_string as recover
from flanker.mime.message.utils import python_message_to_string
from flanker.mime.message.headers.parametrized import fix_content_type

src/f/l/flanker-HEAD/flanker/mime/__init__.py   flanker(Download)
from flanker.mime import create
from flanker.mime.create import from_string
from flanker.mime.message.fallback.create import from_string as recover
from flanker.mime.message.utils import python_message_to_string
from flanker.mime.message.headers.parametrized import fix_content_type

src/f/l/flanker-0.4.14/tests/mime/message/fallback/fallback_test.py   flanker(Download)
def bad_string_test():
    mime = "Content-Type: multipart/broken\n\n"
    message = create.from_string("Content-Type:multipart/broken")
    eq_(mime, message.to_string())
    with closing(StringIO()) as out:
def bad_string_test_2():
    mime = "Content-Mype: multipart/broken\n\n"
    message = create.from_string(mime)
    ok_(message.content_type)
    eq_((None, {}), message.content_disposition)
def message_alter_body_and_serialize_test():
    message = create.from_string(IPHONE)
 
    parts = list(message.walk())
    eq_(3, len(parts))
    with closing(StringIO()) as out:
        message.to_stream(out)
        message1 = create.from_string(out.getvalue())
        message2 = create.from_string(message.to_string())
 

src/f/l/flanker-HEAD/tests/mime/message/fallback/fallback_test.py   flanker(Download)
def bad_string_test():
    mime = "Content-Type: multipart/broken\n\n"
    message = create.from_string("Content-Type:multipart/broken")
    eq_(mime, message.to_string())
    with closing(StringIO()) as out:
def bad_string_test_2():
    mime = "Content-Mype: multipart/broken\n\n"
    message = create.from_string(mime)
    ok_(message.content_type)
    eq_((None, {}), message.content_disposition)
def message_alter_body_and_serialize_test():
    message = create.from_string(IPHONE)
 
    parts = list(message.walk())
    eq_(3, len(parts))
    with closing(StringIO()) as out:
        message.to_stream(out)
        message1 = create.from_string(out.getvalue())
        message2 = create.from_string(message.to_string())