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

All Samples(60)  |  Call(58)  |  Derive(0)  |  Import(2)

src/i/n/inbox-HEAD/src/inbox/server/sendmail/message.py   inbox(Download)
    msg = mime.create.multipart('alternative')
    msg.append(
        mime.create.text('text', plaintext),
        mime.create.text('html', html))
 

src/f/l/flanker-0.4.14/tests/mime/message/create_test.py   flanker(Download)
def create_singlepart_ascii_test():
    message = create.text("plain", u"Hello")
    message = create.from_string(message.to_string())
    eq_("7bit", message.content_encoding.value)
    eq_("Hello", message.body)
 
 
def create_singlepart_unicode_test():
    message = create.text("plain", u"Привет, курилка")
def create_singlepart_ascii_long_lines_test():
    very_long = "very long line  " * 1000 + "preserve my newlines \r\n\r\n"
    message = create.text("plain", very_long)
 
    message2 = create.from_string(message.to_string())
def create_multipart_simple_test():
    message = create.multipart("mixed")
    message.append(
        create.text("plain", "Hello"),
        create.text("html", "<html>Hello</html>"))

src/f/l/flanker-HEAD/tests/mime/message/create_test.py   flanker(Download)
def create_singlepart_ascii_test():
    message = create.text("plain", u"Hello")
    message = create.from_string(message.to_string())
    eq_("7bit", message.content_encoding.value)
    eq_("Hello", message.body)
 
 
def create_singlepart_unicode_test():
    message = create.text("plain", u"Привет, курилка")
def create_singlepart_ascii_long_lines_test():
    very_long = "very long line  " * 1000 + "preserve my newlines \r\n\r\n"
    message = create.text("plain", very_long)
 
    message2 = create.from_string(message.to_string())
def create_multipart_simple_test():
    message = create.multipart("mixed")
    message.append(
        create.text("plain", "Hello"),
        create.text("html", "<html>Hello</html>"))

src/f/l/flanker-0.4.14/tests/mime/message/part_test.py   flanker(Download)
# coding:utf-8
import re
from nose.tools import *
from mock import *
from flanker.mime.create import multipart, text
    message = multipart('alternative')
    message.append(
        text('plain', text1),
        text('plain', text2))
 

src/f/l/flanker-HEAD/tests/mime/message/part_test.py   flanker(Download)
# coding:utf-8
import re
from nose.tools import *
from mock import *
from flanker.mime.create import multipart, text
    message = multipart('alternative')
    message.append(
        text('plain', text1),
        text('plain', text2))
 

src/f/l/flanker-0.4.14/tests/mime/message/threading_test.py   flanker(Download)
def test_wrapper_creates_message_id():
    message = create.text('plain','hey')
    w = Wrapper(message)
    ok_(w.message_id)
    eq_([], w.references)
 
@patch.object(MessageId, 'is_valid', Mock(return_value=True))
def test_wrapper_references():
    message = create.text('plain','hey')
def test_wrapper_in_reply_to():
    message = create.text('plain','hey')
    message.headers['In-Reply-To'] = '<3>'
    message.headers['Message-Id'] = '<4>'
    w = Wrapper(message)
def make_message(message_id, references=None, subject=""):
    message = create.text('plain','hey')
    if message_id:
        message.headers['Message-Id'] = '<{0}>'.format(message_id)
    if references:

src/f/l/flanker-HEAD/tests/mime/message/threading_test.py   flanker(Download)
def test_wrapper_creates_message_id():
    message = create.text('plain','hey')
    w = Wrapper(message)
    ok_(w.message_id)
    eq_([], w.references)
 
@patch.object(MessageId, 'is_valid', Mock(return_value=True))
def test_wrapper_references():
    message = create.text('plain','hey')
def test_wrapper_in_reply_to():
    message = create.text('plain','hey')
    message.headers['In-Reply-To'] = '<3>'
    message.headers['Message-Id'] = '<4>'
    w = Wrapper(message)
def make_message(message_id, references=None, subject=""):
    message = create.text('plain','hey')
    if message_id:
        message.headers['Message-Id'] = '<{0}>'.format(message_id)
    if references: