示例#1
0
文件: test_util.py 项目: seomoz/reppy
 def test_invalid(self):
     '''Raises an error on an unparseable date.'''
     with self.assertRaises(ValueError):
         util.parse_date('Not a real date')
示例#2
0
文件: test_util.py 项目: seomoz/reppy
 def test_rfc_850(self):
     '''An obsolete date format that is also supported.'''
     self.assertEqual(
         util.parse_date('Sunday, 06-Nov-94 08:49:37 GMT'), 784111777)
示例#3
0
文件: test_util.py 项目: seomoz/reppy
 def test_asctime(self):
     '''An obsolete date format that is also supported.'''
     self.assertEqual(
         util.parse_date('Sun Nov  6 08:49:37 1994'), 784111777)
示例#4
0
文件: test_util.py 项目: seomoz/reppy
 def test_imf_fixdate(self):
     '''Successfully parses a IMF fixdate.'''
     self.assertEqual(
         util.parse_date('Sun, 06 Nov 1994 08:49:37 GMT'), 784111777)
示例#5
0
文件: test_util.py 项目: wumpus/reppy
 def test_invalid(self):
     '''Raises an error on an unparseable date.'''
     with self.assertRaises(ValueError):
         util.parse_date('Not a real date')
示例#6
0
文件: test_util.py 项目: wumpus/reppy
 def test_asctime(self):
     '''An obsolete date format that is also supported.'''
     self.assertEqual(util.parse_date('Sun Nov  6 08:49:37 1994'),
                      784111777)
示例#7
0
文件: test_util.py 项目: wumpus/reppy
 def test_rfc_850(self):
     '''An obsolete date format that is also supported.'''
     self.assertEqual(util.parse_date('Sunday, 06-Nov-94 08:49:37 GMT'),
                      784111777)
示例#8
0
文件: test_util.py 项目: wumpus/reppy
 def test_imf_fixdate(self):
     '''Successfully parses a IMF fixdate.'''
     self.assertEqual(util.parse_date('Sun, 06 Nov 1994 08:49:37 GMT'),
                      784111777)