/usr/lib/python3/dist-packages/icalendar/tests/test_multiple.py is in python3-icalendar 3.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | from icalendar import Calendar
from icalendar.prop import vText
from icalendar.tests import unittest
import os
class TestMultiple(unittest.TestCase):
"""A example with multiple VCALENDAR components"""
def test_multiple(self):
directory = os.path.dirname(__file__)
cals = Calendar.from_ical(
open(os.path.join(directory, 'multiple.ics'), 'rb').read(),
multiple=True
)
self.assertEqual(len(cals), 2)
self.assertSequenceEqual([comp.name for comp in cals[0].walk()],
['VCALENDAR', 'VEVENT'])
self.assertSequenceEqual([comp.name for comp in cals[1].walk()],
['VCALENDAR', 'VEVENT', 'VEVENT'])
self.assertEqual(
cals[0]['prodid'],
vText('-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN')
)
|