示例#1
0
    def test_time_linear(self):

        test_post = Post(published=datetime.datetime.now() -
                         datetime.timedelta(days=1))
        later_time = datetime.datetime.now()

        self.assertLess(test_post.get_post_date(), later_time)
示例#2
0
    def test_post_date(self):

        test_post = Post(published=datetime.datetime.now())

        self.assertIsNotNone(test_post.get_post_date())