kopia lustrzana https://github.com/collective/icalendar
more tests, mark test as expected failure
rodzic
20e09f3523
commit
2b56bc4ee7
|
@ -14,7 +14,8 @@ New features:
|
|||
|
||||
Bug fixes:
|
||||
|
||||
- *add item here*
|
||||
- Categories are comma separated not 1 per line #265. [cleder]
|
||||
- mark test with mixed timezoneaware and naive datetimes as an expected failure. [cleder]
|
||||
|
||||
|
||||
4.0.2 (2018-06-20)
|
||||
|
|
|
@ -269,17 +269,17 @@ class vDDDLists(object):
|
|||
|
||||
class vCategory(object):
|
||||
|
||||
def __init__(self, c_list, encoding=DEFAULT_ENCODING):
|
||||
def __init__(self, c_list):
|
||||
if not hasattr(c_list, '__iter__'):
|
||||
d_list = [c_list]
|
||||
self.cats = [to_unicode(c, encoding=encoding) for c in c_list]
|
||||
self.cats = [vText(c) for c in c_list]
|
||||
|
||||
def to_ical(self):
|
||||
return ",".join(self.cats)
|
||||
return b",".join([c.to_ical() for c in self.cats])
|
||||
|
||||
@staticmethod
|
||||
def from_ical(ical, timezone=None):
|
||||
out = ical.split(",")
|
||||
out = unescape_char(ical).split(",")
|
||||
return out
|
||||
|
||||
|
||||
|
|
|
@ -148,9 +148,15 @@ class TestTimezoned(unittest.TestCase):
|
|||
|
||||
|
||||
class TestTimezoneCreation(unittest.TestCase):
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_create_america_new_york(self):
|
||||
"""testing America/New_York, the most complex example from the
|
||||
RFC"""
|
||||
# FIXME
|
||||
# This currently fails because of mixed naive and timezone
|
||||
# aware datetimes in dtstart and until which breaks
|
||||
# dateutil recurrence.
|
||||
|
||||
directory = os.path.dirname(__file__)
|
||||
with open(os.path.join(directory, 'america_new_york.ics'), 'rb') as fp:
|
||||
|
|
Ładowanie…
Reference in New Issue