Commits

Guido Draheim committed 469a5eb

more tests

Comments (0)

Files changed (3)

 syntax: regexp
 ^src/dvbcronrecording/locale/de/LC_MESSAGES/dvbcronrecording\.po$
 syntax: regexp
-^src/MANIFEST$
+^src/MANIFEST$
+syntax: regexp
+^\.settings$
+

src/dvbcronrecording/computer.py

         self.adapter = None
     def __unicode__(self):
         return u"["+unicode(",".join([unicode(item) for item in self.items]))+"]"
+    def __str__(self):
+        return unicode(self)
 
 class RecorderGroupPlan:
     def __init__(self):
         """ datetimeX, datetimeY, adapter from timelist_groups() """
         groups = sorted(self._groups, key = lambda x: (x.datetimeX, x.datetimeY, x.adapter))
         self._groups = groups
+    def __unicode__(self):
+        groups = [unicode(item) for item in self._groups]
+        return u"{%s}" % groups
+    def __str__(self):
+        return unicode(self)
 
 class RecorderFlatPlan:
     def __init__(self):

src/tests/computer_test.py

         self.assertEqual([1], self.computer.adapters("3sat"))
         self.assertEqual([0, 1], self.computer.adapters("ard"))
     def test_03_entries(self):
-        a = Entry("ard","ard1","22:30","23:30","0", "mi", "", "ok")
+        a = Entry("ard","ard1","22:30","23:30","0", "6", "", "ok")
+        req = Request(Locale("de"))
+        print self.computer.plan4(req, [a])
+    def test_04_entries(self):
+        a = Entry("ard","ard1","22:30","23:30","0", "", "22.04.", "ok")
         req = Request(Locale("de"))
         print self.computer.plan4(req, [a])