Ejemplo n.º 1
0
    def test_export_calendar_dates_txt(self):
        ServiceDate.objects.create(
            date=date(2012, 8, 31), service=self.service, exception_type=2)
        ServiceDate.objects.create(
            date=date(2012, 9, 1), service=self.service, exception_type=1)
        cdates_txt = ServiceDate.export_txt(self.feed)
        self.assertEqual(cdates_txt, """\
service_id,date,exception_type
S1,20120831,2
S1,20120901,1
""")
Ejemplo n.º 2
0
    def test_export_calendar_dates_txt(self):
        ServiceDate.objects.create(date=date(2012, 8, 31),
                                   service=self.service,
                                   exception_type=2)
        ServiceDate.objects.create(date=date(2012, 9, 1),
                                   service=self.service,
                                   exception_type=1)
        cdates_txt = ServiceDate.export_txt(self.feed)
        self.assertEqual(
            cdates_txt, """\
service_id,date,exception_type
S1,20120831,2
S1,20120901,1
""")
Ejemplo n.º 3
0
 def test_export_calendar_dates_txt_none(self):
     cdates_txt = ServiceDate.export_txt(self.feed)
     self.assertFalse(cdates_txt)
Ejemplo n.º 4
0
 def test_export_calendar_dates_txt_none(self):
     cdates_txt = ServiceDate.export_txt(self.feed)
     self.assertFalse(cdates_txt)