Ejemplo n.º 1
0
 def test_all_day_event_is_successful(self):
     ny_tz = pytz.timezone("America/New_York")
     start = ny_tz.localize(datetime.datetime(2013, 12, 2, 12, 00))
     end = ny_tz.localize(datetime.datetime(2013, 12, 2, 13, 00))
     result = exporter.get_google_calendar_url(
         'Gigabit event', start, end,  'Community meet-up', 'Somewhere')
     parsed_url = urlparse.urlparse(result)
     eq_(parsed_url.netloc, 'www.google.com')
     eq_(parsed_url.path, '/calendar/render')
     parsed_qs = urlparse.parse_qs(parsed_url.query)
     eq_(parsed_qs, {
         u'action': [u'TEMPLATE'],
         u'text': [u'Gigabit event'],
         u'dates': [u'20131202T170000Z/20131202T180000Z'],
         u'details': [u'Community meet-up'],
         u'location': [u'Somewhere']
     })
Ejemplo n.º 2
0
 def get_google_calendar_url(self):
     return exporter.get_google_calendar_url(
         self.name, self.start_datetime, self.end_datetime,
         self.description, self.address)