Beispiel #1
0
 def test_parse_year_1(self):
     self.assertEquals(parse("2015"), "Y-2015")
Beispiel #2
0
 def test_parse_invalid(self):
     self.assertIsNone(parse("Patrick"))
Beispiel #3
0
 def test_parse_quarter_2(self):
     self.assertEquals(parse("2015Q1"), "Q-2015-1")
Beispiel #4
0
 def test_parse_quarter_3(self):
     with self.assertRaises(ValidationError):
         self.assertEquals(parse("2015Q5"), "Q-2015-5")
Beispiel #5
0
 def test_parse_month_6(self):
     self.assertEquals(parse("2015 January"), "M-2015-01")
Beispiel #6
0
 def test_parse_month_5(self):
     self.assertEquals(parse("01/2015"), "M-2015-01")
Beispiel #7
0
 def test_parse_month_3(self):
     self.assertEquals(parse("January 2015"), "M-2015-01")
Beispiel #8
0
 def test_parse_month_1(self):
     self.assertEquals(parse("jan 2015"), "M-2015-01")
Beispiel #9
0
 def test_parse_week_4(self):
     self.assertEquals(parse("2015W3"), "W-2015-03")