def test_dotted_shortday(self): """ Make sure that conversion from YYYY.M.D to YYYY-MM-DD works """ date = utils.normalize_dotted_date("2007.2.9") self.assertEqual("2007-02-09", date)
def test_dotted_month(self): """ Make sure that weird dates with unknown days work """ date = utils.normalize_dotted_date("2007.02.??") self.assertEqual("2007-02", date)
def test_dotted_day(self): """ Make sure that conversion from YYYY.MM.DD to YYYY-MM-DD works """ date = utils.normalize_dotted_date("2007.02.20") self.assertEqual("2007-02-20", date)
def test_dotted_year(self): """ Make sure that weird dates with unknown month and days work """ date = utils.normalize_dotted_date("2007.??.??") self.assertEqual("2007", date)