コード例 #1
0
 def test_get_new_post_delay__has_old_post(self):
     PostPrototype.create(thread=self.thread,
                          author=self.account,
                          text='post-1-text')
     PostPrototype._db_all().update(created_at=datetime.datetime.now() -
                                    datetime.timedelta(days=30))
     self.assertEqual(PostPrototype.get_new_post_delay(self.account), 0)
コード例 #2
0
 def test_get_new_post_delay__has_old_post(self):
     PostPrototype.create(thread=self.thread, author=self.account, text='post-1-text')
     PostPrototype._db_all().update(created_at=datetime.datetime.now() - datetime.timedelta(days=30))
     self.assertEqual(PostPrototype.get_new_post_delay(self.account), 0)
コード例 #3
0
 def setUp(self):
     super(TestCreatePostRequests, self).setUp()
     PostPrototype._db_all().update(created_at=datetime.datetime.now() - datetime.timedelta(days=30))
コード例 #4
0
ファイル: test_requests.py プロジェクト: Alkalit/the-tale
 def setUp(self):
     super(TestCreatePostRequests, self).setUp()
     PostPrototype._db_all().update(created_at=datetime.datetime.now() - datetime.timedelta(days=30))