def test_name_addr(self): our_header = Header('"теснятся"', '<*****@*****.**>') assert_equal(our_header.encode(), '=?utf-8?b?ItGC0LXRgdC90Y/RgtGB0Y8i?= <*****@*****.**>')
def test_ascii(self): our_header = Header('[asdf2:wiki] Discussion for Home page') assert_equal(our_header.encode(), '[asdf2:wiki] Discussion for Home page')
def test_utf8(self): our_header = Header('теснятся') assert_equal(our_header.encode(), '=?utf-8?b?0YLQtdGB0L3Rj9GC0YHRjw==?=')
def test_bytestring(self): our_header = Header(b'[asdf2:wiki] Discussion for Home page') assert_equal(our_header.encode(), '[asdf2:wiki] Discussion for Home page')