Пример #1
0
 def test_sanitize_nope(self):
     """Test failure."""
     self.assertEqual(None, sanitize_date('2012 Early Spring'))
Пример #2
0
 def test_sanitize_6(self):
     """Test YYYY Mon DD-DD."""
     self.assertEqual('2012-12-12', sanitize_date('2012 Dec 12-15'))
Пример #3
0
 def test_sanitize_7(self):
     """Test YYYY Mon DD-Mon DD."""
     self.assertEqual('2005-01-29', sanitize_date('2005 Jan 29-Feb 4'))
Пример #4
0
 def test_sanitize_4(self):
     """Test YYYY Mon-Mon."""
     self.assertEqual('2012-10-01', sanitize_date('2012 Oct-Dec'))
Пример #5
0
 def test_sanitize_5(self):
     """Test YYYY Season."""
     self.assertEqual('2012-03-01', sanitize_date('2012 Spring'))
Пример #6
0
 def test_sanitize_2(self):
     """Test YYYY Mon."""
     self.assertEqual('2012-12-01', sanitize_date('2012 Dec'))
Пример #7
0
 def test_sanitize_3(self):
     """Test YYYY."""
     self.assertEqual('2012-01-01', sanitize_date('2012'))
Пример #8
0
 def test_sanitize_nope(self):
     self.assertEqual(None, sanitize_date('2012 Early Spring'))
Пример #9
0
 def test_sanitize_1(self):
     """Test YYYY Mon DD."""
     self.assertEqual('2012-12-19', sanitize_date('2012 Dec 19'))
Пример #10
0
 def test_sanitize_6(self):
     self.assertEqual('2012-12-12', sanitize_date('2012 Dec 12-15'))
Пример #11
0
 def test_sanitize_7(self):
     self.assertEqual('2005-01-29', sanitize_date('2005 Jan 29-Feb 4'))
Пример #12
0
 def test_sanitize_5(self):
     self.assertEqual('2012-03-01', sanitize_date('2012 Spring'))
Пример #13
0
 def test_sanitize_4(self):
     self.assertEqual('2012-10-01', sanitize_date('2012 Oct-Dec'))
Пример #14
0
 def test_sanitize_3(self):
     self.assertEqual('2012-01-01', sanitize_date('2012'))
Пример #15
0
 def test_sanitize_2(self):
     self.assertEqual('2012-12-01', sanitize_date('2012 Dec'))
Пример #16
0
 def test_sanitize_1(self):
     self.assertEqual('2012-12-19', sanitize_date('2012 Dec 19'))