Exemple #1
0
    def test_export_calendar_txt(self):
        Service.objects.create(
            feed=self.feed, service_id='W', monday=True, tuesday=False,
            wednesday=True, thursday=False, friday=True, saturday=False,
            sunday=True, start_date=date(2012, 7, 17),
            end_date=date(2013, 7, 17))
        calendar_txt = Service.export_txt(self.feed)
        self.assertEqual(calendar_txt, """\
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,\
start_date,end_date
W,1,0,1,0,1,0,1,20120717,20130717
""")
Exemple #2
0
    def test_export_calendar_txt(self):
        Service.objects.create(feed=self.feed,
                               service_id='W',
                               monday=True,
                               tuesday=False,
                               wednesday=True,
                               thursday=False,
                               friday=True,
                               saturday=False,
                               sunday=True,
                               start_date=date(2012, 7, 17),
                               end_date=date(2013, 7, 17))
        calendar_txt = Service.export_txt(self.feed)
        self.assertEqual(
            calendar_txt, """\
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,\
start_date,end_date
W,1,0,1,0,1,0,1,20120717,20130717
""")
Exemple #3
0
 def test_export_calendar_txt_none(self):
     calendar_txt = Service.export_txt(self.feed)
     self.assertFalse(calendar_txt)
Exemple #4
0
 def test_export_calendar_txt_none(self):
     calendar_txt = Service.export_txt(self.feed)
     self.assertFalse(calendar_txt)