Commits

Guido Draheim committed c86f354

adapt str for tests

Comments (0)

Files changed (2)

src/dvbcronrecording/computer.py

         return item
     def __unicode__(self):
         x = u"{ "
-        x += u" [%s-%s]" % (MMMtoHHMM(self.newtimeMMM), MMMtoHHMM(self.endtimeMMM))
-        x += u"%s@%s" % (self.weekday, self.adapter)
-        x += u" %s(%s)" % (self.onlyday, unicode(self.months))
+        x += u" %s[%s-%s]" % (self.channelname, MMMtoHHMM(self.newtimeMMM), MMMtoHHMM(self.endtimeMMM))
+        x += u"%s@%s" % (self.extratimeM, self.adapter)
+        x += u" %s(%s)%s" % (self.onlyday, unicode(self.months), self.weekday)
         x += u" '%s'" % (unicode(self.title))
         x += u" }"
         return x

src/tests/computer_test.py

         req = Request(Locale("de"))
         res = self.computer.plan4(req, [a])
         self.logg.info("\n%s", res)
-        E = u"{[{  [22:30-23:30]6@0 None([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) 'ard1' }]}"
+        E = u"{[{  ard[22:30-23:30]0@0 None([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])6 'ard1' }]}"
         self.assertEqual(unicode(res), E)
     def test_04_entries(self):
         a = Entry("ard","ard1","22:30","23:30","0", "", "22.04.", "ok")
         req = Request(Locale("de"))
         res = self.computer.plan4(req, [a])
         self.logg.info("\n%s", res)
-        E = u"{[{  [22:30-23:30]6@0 22([4]) 'ard1' }]}"
+        E = u"{[{  ard[22:30-23:30]0@0 22([4])6 'ard1' }]}"
         self.assertEqual(unicode(res), E)
     def test_10_2entries(self):
         a = Entry("ard","ard1","22:30","23:30","0", "", "22.04.", "ok")
         req = Request(Locale("de"))
         res = self.computer.plan4(req, [a, b])
         self.logg.info("\n%s", res)
-        E = u"{[{  [22:30-23:30]6@0 22([4]) 'ard1' },{  [23:30-00:30]6@0 22([4]) 'ard1' }]}"
+        E = u"{[{  ard[22:30-23:30]0@0 22([4])6 'ard1' },{  ard[23:30-00:30]0@0 22([4])6 'ard1' }]}"
         self.assertEqual(unicode(res), E)
     def test_11_2entries(self):
         a = Entry("ard","ard1","22:30","23:30","0", "", "22.04.", "ok")
         req = Request(Locale("de"))
         res = self.computer.plan4(req, [a, b])
         self.logg.info("\n%s", res)
-        E = u"{[{  [22:30-23:30]6@0 22([4]) 'ard1' }],[{  [23:33-00:33]6@0 22([4]) 'ard1' }]}"
+        E = u"{[{  ard[22:30-23:30]0@0 22([4])6 'ard1' }],[{  ard[23:33-00:33]0@0 22([4])6 'ard1' }]}"
         self.assertEqual(unicode(res), E)
 
 if __name__ == "__main__":