Ejemplo n.º 1
0
	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)
Ejemplo n.º 2
0
	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)
Ejemplo n.º 3
0
	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)
Ejemplo n.º 4
0
	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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 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)