merge with master;

pull/98/head
Johannes Raggam 2013-03-19 14:25:45 +01:00
commit 2f53d1f180
3 zmienionych plików z 13 dodań i 6 usunięć

Wyświetl plik

@ -33,3 +33,4 @@ iCalendar contributors
- spanktar <spanky@kapanka.com>
- tgecho <tgecho@gmail.com>
- Ronan Dunklau <ronan@dunklau.fr>
- Victor Varvaryuk <victor.varvariuc@gmail.com>

Wyświetl plik

@ -57,6 +57,12 @@ def tzid_from_dt(dt):
def foldline(text, length=75, newline='\r\n'):
"""Make a string folded per RFC5545 (each line must be less than 75 octets)
Lines of text SHOULD NOT be longer than 75 octets, excluding the line
break. Long content lines SHOULD be split into a multiple line
representations using a line "folding" technique. That is, a long
line can be split between any two characters by inserting a CRLF
immediately followed by a single linear white-space character (i.e.,
SPACE or HTAB).
"""
assert isinstance(text, str)
# text.decode('utf-8') # try to decode, to be sure it's utf-8 or ASCII

Wyświetl plik

@ -80,18 +80,18 @@ class TestPropertyParams(unittest.TestCase):
self.assertEqual(vevent['ORGANIZER'].params['CN'], cn_decoded)
vevent = Event.from_ical(
u'BEGIN:VEVENT\r\n'
u'ORGANIZER;CN=that\\, that\\; that\\\\ that\\:'
u':это\\, то\\; that\\\\ that\\:\r\n'
u'END:VEVENT\r\n'
'BEGIN:VEVENT\r\n'
'ORGANIZER;CN=that\\, that\\; %th%%at%\\\\ that\\:'
':это\\, то\\; that\\\\ %th%%at%\\:\r\n'
'END:VEVENT\r\n'
)
self.assertEqual(
vevent['ORGANIZER'].params['CN'],
ur'that, that; that\ that:'
r'that, that; %th%%at%\ that:'
)
self.assertEqual(
vevent['ORGANIZER'],
ur'это, то; that\ that:'
r'это, то; that\ %th%%at%:'
)
def test_parameters_class(self):