Lines Matching defs:text
33 from email.mime.text import MIMEText
70 eq(msg.get_content_type(), 'text/plain')
71 eq(msg['content-type'], 'text/plain; charset="iso-8859-1"')
78 eq(msg['content-type'], 'text/plain')
82 msg['Content-Type'] = 'text/x-weird'
86 eq(msg['content-type'], 'text/x-weird; charset="iso-8859-1"')
94 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
191 eq(value, 'text/plain; charset="us-ascii"; boundary="BOUNDARY"')
280 text = fp.read()
284 eq(s.getvalue(), text)
301 text = fp.read()
302 self.assertEqual(text, str(msg))
306 self.assertEqual(text, NL.join(lines[1:]))
320 Content-type: text/plain; charset="iso-8859-1"
329 Content-type: text/plain; charset="iso-8859-1"
424 # msg["Content-Type"] = 'text/plain; weird="hey; dolly? [you] @ <\\"home\\">?"'
465 eq(msg.get_params(), [('text/plain', ''),
468 eq(msg.get_params(unquote=False), [('text/plain', ''),
504 msg.add_header('Content-Type', 'text/plain', charset='utf-8')
512 self.assertRaises(ValueError, msg.set_type, 'text')
513 msg.set_type('text/plain')
514 eq(msg['content-type'], 'text/plain')
516 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
517 msg.set_type('text/html')
518 eq(msg['content-type'], 'text/html; charset="us-ascii"')
522 msg['X-Content-Type'] = 'text/plain'
528 self.assertEqual(msg.get_content_type(), 'text/plain')
547 self.assertEqual(msg.get_content_type(), 'text/plain')
551 self.assertEqual(msg.get_content_type(), 'text/plain')
555 self.assertEqual(msg.get_content_maintype(), 'text')
572 self.assertEqual(msg.get_content_maintype(), 'text')
576 self.assertEqual(msg.get_content_maintype(), 'text')
606 self.assertEqual(msg.get_content_maintype(), 'text')
659 msg['content-type'] = 'text/plain'
670 msg['content-type'] = 'text/plain; charset="utf-8"'
718 msg['content-type'] = 'text/plain; charset=%s' % charset
729 msg['content-type'] = 'text/plain; charset=%s' % charset
741 msg['content-type'] = 'text/plain; charset=%s' % charset
778 Content-Type: text/plain; charset="us-ascii"
790 Content-Type: text/plain; charset="utf-8"
837 Content-Type: text/plain; charset="iso-2022-jp"
844 msg = MIMEText('\xe1\xf6\n', 'text', 'ISO-8859-1')
847 Content-Type: text/text; charset="iso-8859-1"
855 msg = MIMEText('\u017c\n', 'text', 'ISO-8859-2')
858 Content-Type: text/text; charset="iso-8859-2"
875 \tmore text
885 \tmore text
895 \tmore text"""
900 \tmore text""")
905 more text""")
1016 Content-Type: text/plain; charset="us-ascii"
1481 Content-Type: text/plain
1495 Content-Type: text/plain; charset="utf-8"
1727 eq(self._msg.get_content_type(), 'text/plain')
1742 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
1748 eq(msg['content-type'], 'text/plain; charset="utf-8"')
1755 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
1761 eq(msg['content-type'], 'text/plain; charset="us-ascii"')
1769 eq(msg['content-type'], 'text/plain; charset="utf-8"')
1837 text = """\
1850 msg = Parser().parsestr(text)
1851 self.ndiffAssertEqual(text, msg.as_string())
1909 Content-Type: text/plain; charset="us-ascii"
1936 Content-Type: text/plain; charset="us-ascii"
1963 Content-Type: text/plain; charset="us-ascii"
1990 Content-Type: text/plain; charset="us-ascii"
2017 Content-Type: text/plain; charset="us-ascii"
2044 Content-Type: text/plain; charset="us-ascii"
2064 eq(subsubpart.get_content_type(), 'text/plain')
2086 text/plain
2087 text/plain
2088 text/plain
2089 text/plain
2106 text/plain
2113 Content-Type: text/html; boundary="--961284236552522269"
2116 Content-Type: text/html;
2131 Content-Type: text/plain
2135 Content-Type: text/plain
2171 eq(msg.get_content_type(), 'text/plain')
2172 eq(msg.get_content_maintype(), 'text')
2205 Content-Type: text/plain
2244 # RFC 2045, $5.2 says invalid yields text/plain
2245 msg['Content-Type'] = 'text'
2246 eq(msg.get_content_maintype(), 'text')
2248 eq(msg.get_content_type(), 'text/plain')
2252 eq(msg.get_content_maintype(), 'text')
2254 eq(msg.get_content_type(), 'text/plain')
2266 Content-Type: text/plain
2271 Content-Type: text/plain
2305 # text/plain
2539 # Subpart 1 is a text/plain, human readable section
2541 eq(subpart.get_content_type(), 'text/plain')
2585 eq(subsubpart.get_content_type(), 'text/plain')
2592 text = fp.read()
2607 eq(sfp.getvalue(), text)
2630 Content-Type: text/plain; charset="us-ascii"
2636 Content-Type: text/plain; charset="us-ascii"
2655 eq(container1a.get_default_type(), 'text/plain')
2656 eq(container1a.get_content_type(), 'text/plain')
2658 eq(container2a.get_default_type(), 'text/plain')
2659 eq(container2a.get_content_type(), 'text/plain')
2672 eq(container1a.get_default_type(), 'text/plain')
2673 eq(container1a.get_content_type(), 'text/plain')
2675 eq(container2a.get_default_type(), 'text/plain')
2676 eq(container2a.get_content_type(), 'text/plain')
2703 Content-Type: text/plain; charset="us-ascii"
2713 Content-Type: text/plain; charset="us-ascii"
2735 Content-Type: text/plain; charset="us-ascii"
2743 Content-Type: text/plain; charset="us-ascii"
2783 msg = MIMENonMultipart('text', 'plain')
2789 r = MIMENonMultipart('text', 'plain')
2795 # regenerate the plain text. The original text and the transformed text
2808 def _idempotent(self, msg, text, unixfrom=False):
2813 eq(text, s.getvalue())
2817 msg, text = self._msgobj('msg_01.txt')
2818 eq(msg.get_content_type(), 'text/plain')
2819 eq(msg.get_content_maintype(), 'text')
2825 self._idempotent(msg, text)
2829 msg, text = self._msgobj('msg_03.txt')
2830 eq(msg.get_content_type(), 'text/plain')
2833 self._idempotent(msg, text)
2836 msg, text = self._msgobj('msg_04.txt')
2837 self._idempotent(msg, text)
2840 msg, text = self._msgobj('msg_02.txt')
2841 self._idempotent(msg, text)
2844 msg, text = self._msgobj('msg_27.txt')
2845 self._idempotent(msg, text)
2848 msg, text = self._msgobj('msg_28.txt')
2849 self._idempotent(msg, text)
2852 msg, text = self._msgobj('msg_06.txt')
2853 self._idempotent(msg, text)
2856 msg, text = self._msgobj('msg_05.txt')
2857 self._idempotent(msg, text)
2860 msg, text = self._msgobj('msg_16.txt')
2861 self._idempotent(msg, text)
2864 msg, text = self._msgobj('msg_21.txt')
2865 self._idempotent(msg, text)
2868 msg, text = self._msgobj('msg_23.txt')
2869 self._idempotent(msg, text)
2872 msg, text = self._msgobj('msg_24.txt')
2873 self._idempotent(msg, text)
2876 msg, text = self._msgobj('msg_31.txt')
2877 self._idempotent(msg, text)
2880 msg, text = self._msgobj('msg_32.txt')
2881 self._idempotent(msg, text)
2884 msg, text = self._msgobj('msg_33.txt')
2885 self._idempotent(msg, text)
2888 msg, text = self._msgobj('msg_34.txt')
2889 self._idempotent(msg, text)
2892 msg, text = self._msgobj('msg_12a.txt')
2893 self._idempotent(msg, text)
2896 msg, text = self._msgobj('msg_36.txt')
2897 self._idempotent(msg, text)
2900 msg, text = self._msgobj('msg_43.txt')
2901 self._idempotent(msg, text, unixfrom=True)
2904 msg, text = self._msgobj('msg_45.txt')
2905 self._idempotent(msg, text)
2910 msg, text = self._msgobj('msg_05.txt')
2923 eq(msg1.get_content_type(), 'text/plain')
2926 eq(msg2.get_content_type(), 'text/plain')
2940 msg, text = self._msgobj('msg_06.txt')
2944 # that submessage has a type of text/plain
2950 eq(msg1.get_content_type(), 'text/plain')
2960 text = fp.read()
2961 msg = email.message_from_string(text)
2967 self.assertEqual(text, s.getvalue())
2971 text = fp.read()
2979 self.assertEqual(text, s.getvalue())
2983 text = fp.read()
2989 msg = email.message_from_string(text, MyMessage)
2993 text = fp.read()
2994 msg = email.message_from_string(text, MyMessage)
3378 msg['Content-Type'] = 'text/plain; charset=UTF-8'
3379 eq(msg['content-type'], 'text/plain; charset=UTF-8')
3391 msg['Content-Type'] = 'text/plain; charset="US-ASCII"'
3417 text/plain
3419 text/plain
3420 text/plain
3421 text/plain
3422 text/plain
3423 text/plain
3424 text/plain
3425 text/plain
3426 text/plain
3427 text/plain
3428 text/plain
3429 text/plain
3430 text/plain
3431 text/plain
3432 text/plain
3433 text/plain
3434 text/plain
3435 text/plain
3436 text/plain
3437 text/plain
3438 text/plain
3439 text/plain
3440 text/plain
3441 text/plain
3442 text/plain
3443 text/plain
3444 text/plain
3445 text/rfc822-headers
3544 it = iterators.typed_subpart_iterator(msg, 'text')
3561 it = iterators.typed_subpart_iterator(msg, 'text', 'plain')
3766 eq(part1.get_content_type(), 'text/plain')
3774 text = fp.read()
3775 msg = email.message_from_string(text)
3779 self.assertEqual(s.getvalue(), text)
3791 # text/plain
3793 # text/plain
3802 eq(part1a.get_content_type(), 'text/plain')
3811 eq(part2a.get_content_type(), 'text/plain')
3825 value1 = 'text'
3826 value2 = 'more text'
3866 "Content-Type: text/plain\n"
3889 Content-Type: text/plain; charset={charset}
4033 Content-Type: text/pl\xA7in; charset=utf-8
4035 self.assertEqual(msg.get_content_type(), "text/pl\uFFFDin")
4036 self.assertEqual(msg.get_content_maintype(), "text")
4052 Content-Type: text/plain; charset=us-ascii;
4060 Content-Type: text/plain; charset=us-ascii;
4068 Content-Type: text/plain; charset=us-ascii;
4073 self.assertEqual(msg.get_content_maintype(), 'text')
4078 Content-Type: text/plain; charset=latin-1
4091 Content-Type: text/plain; charset="utf-8"
4117 Content-Type: text/plain; charset="utf-8"
4170 Content-Type: text/plain; charset="latin-1"
4181 Content-Type: text/plain; charset="iso-8859-1"
4210 text = fp.read()
4211 msg = email.message_from_bytes(text)
4215 self.assertEqual(s.getvalue(), text)
4230 Content-Type: text/plain; charset="utf-8"
4240 Content-Type: text/html; charset="utf-8"
5150 Content-Type: text/plain; charset=us-ascii;
5164 self.assertEqual(msg['content-type'], 'text/plain; title="foo"')
5166 self.assertEqual(msg['content-type'], 'text/plain; title=bar')
5169 self.assertEqual(msg['content-type'], 'text/plain; title="(bar)bell"')
5190 Content-Type: text/plain; charset="us-ascii";
5244 Content-Type: text/html; NAME*0=file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEM; NAME*1=P_nsmail.htm
5323 Content-Type: text/plain;
5348 Content-Type: text/plain; charset*=bogus''utf-8%E2%80%9D
5358 Content-Type: text/plain; charset*=ascii''utf-8%E2%80%9D
5522 Content-Type: text/plain; charset="windows-1251";