Work on removing some more .ics files generated by tests. These are now

generated in a temp directory instead.
pull/6/head
Martijn Faassen 2005-03-23 16:16:02 +00:00
rodzic 955dc3b333
commit 8c98240a90
3 zmienionych plików z 7 dodań i 38 usunięć

Wyświetl plik

@ -1,16 +0,0 @@
BEGIN:VCALENDAR
PRODID:-//My calendar product//mxm.dk//
VERSION:2.0
BEGIN:VEVENT
ATTENDEE;CN=Max Rasmussen;ROLE=REQ-PARTICIPANT:MAILTO:maxm@example.com
ATTENDEE;CN=The Dude;ROLE=REQ-PARTICIPANT:MAILTO:the-dude@example.com
DTEND:20050404T100000Z
DTSTAMP:20050404T001000Z
DTSTART:20050404T080000Z
LOCATION:Odense\, Denmark
ORGANIZER;CN=Max Rasmussen;ROLE=CHAIR:MAILTO:noone@example.com
PRIORITY:5
SUMMARY:Python meeting about calendaring
UID:20050115T101010/27346262376@mxm.dk
END:VEVENT
END:VCALENDAR

Wyświetl plik

@ -272,30 +272,13 @@ that can be loaded into the Mozilla calendar
>>> cal.add_component(event)
Write to disc
>>> import os
>>> directory = os.path.dirname(__file__)
>>> import tempfile, os
>>> directory = tempfile.mkdtemp()
>>> f = open(os.path.join(directory, 'example.ics'), 'wb')
>>> f.write(cal.as_string())
>>> f.close()
And that generates this file.
BEGIN:VCALENDAR
PRODID:-//My calendar product//mxm.dk//
VERSION:2.0
BEGIN:VEVENT
ATTENDEE:MAILTO:maxm@example.com
ATTENDEE:MAILTO:the-dude@example.com
DTEND:20050404T100000Z
DTSTAMP:20050404T001000Z
DTSTART:20050404T080000Z
LOCATION:Odense, Denmark
ORGANIZER;CN=Max Rasmussen;ROLE=CHAIR:MAILTO:noone@example.com
PRIORITY:5
SUMMARY:Python meeting about calendaring
UID:20050115T101010/27346262376@mxm.dk
END:VEVENT
END:VCALENDAR
XXX We should check whether the write succeeded here..
--

Wyświetl plik

@ -511,7 +511,9 @@ class Calendar(Component):
'BEGIN:VEVENT\\r\\nDTSTART:20050404T080000\\r\\nSUMMARY:Python meeting about calendaring\\r\\nUID:42\\r\\nEND:VEVENT\\r\\n'
Write to disc
>>> open('test.ics', 'wb').write(cal.as_string())
>>> import tempfile, os
>>> directory = tempfile.mkdtemp()
>>> open(os.path.join(directory, 'test.ics'), 'wb').write(cal.as_string())
"""
name = 'VCALENDAR'