示例#1
0
 def test_set_creation_date7(self):
     """
     A todo item with an invalid creation date is not considered to have
     one.
     """
     todo = TodoBase("x 2017-07-01 2017-06-31 Invalid")
     self.assertIsNone(todo.creation_date())
示例#2
0
 def test_set_creation_date7(self):
     """
     A todo item with an invalid creation date is not considered to have
     one.
     """
     todo = TodoBase("x 2017-07-01 2017-06-31 Invalid")
     self.assertIsNone(todo.creation_date())
示例#3
0
    def test_set_creation_date5(self):
        todo = TodoBase("x 2014-07-25 2014-07-23 Foo")
        creation_date = date(2014, 7, 24)

        todo.set_creation_date(creation_date)

        self.assertEqual(todo.creation_date(), creation_date)
        self.assertEqual(todo.src, "x 2014-07-25 2014-07-24 Foo")
示例#4
0
    def test_set_creation_date2(self):
        todo = TodoBase("(A) Foo")
        creation_date = date(2014, 7, 24)

        todo.set_creation_date(creation_date)

        self.assertEquals(todo.creation_date(), creation_date)
        self.assertEquals(todo.src, "(A) 2014-07-24 Foo")