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