Beispiel #1
0
	def get_publish_date_format(obj):
		try:
			publish_date = obj.publish_date
		except AttributeError:
			publish_date = None
		if publish_date is not None:
			return DateTimeService.get_date(publish_date)
Beispiel #2
0
 def test__get_date_hour(self):
     get_date_service_hour = DateTimeService.get_date(self.datetime_one_hour)
     expected_date_hour = '1 saat önce'
     self.assertEqual(expected_date_hour, get_date_service_hour)
Beispiel #3
0
 def test__get_date_now(self):
     get_date_service_now = DateTimeService.get_date(self.datetime_now)
     expected_date_now = 'az önce'
     self.assertEqual(expected_date_now, get_date_service_now)