コード例 #1
0
ファイル: tests.py プロジェクト: 1stvamp/causal
 def test_convert_date_null_entry(self):
     """Check a None object is handled correctly."""
     
     self.assertFalse(_convert_date(None))
コード例 #2
0
ファイル: tests.py プロジェクト: 1stvamp/causal
 def test_convert_date_missing_date(self):
     """Check we handle a missing date key"""
     
     tmp_entry = self.feed[0]
     del(tmp_entry['created_at'])
     self.assertFalse(_convert_date(tmp_entry))
コード例 #3
0
ファイル: tests.py プロジェクト: 1stvamp/causal
 def test_convert_date(self):
     """Test the method for adding the time diff to a date."""
     
     self.assertEqual(_convert_date(self.feed[0]).hour, 22)