fix en_GB tests

This commit is contained in:
Amith211 2021-11-15 16:56:59 +00:00
parent 0312a4210d
commit df51cc05d8
No known key found for this signature in database
GPG Key ID: 51292ED62E455261
1 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import datetime
from django.core.exceptions import ValidationError
from django.forms.fields import DateTimeField
from django.test import TestCase, override_settings, tag
from django.test import TestCase, override_settings # , tag
from django.utils.formats import date_format, time_format
from babybuddy.middleware import update_en_gb_date_formats
@ -32,7 +32,7 @@ class GbFormatsTestCase(TestCase):
with self.assertRaises(ValidationError):
field.to_python('invalid date string!')
@tag('isolate')
# @tag('isolate')
@override_settings(LANGUAGE_CODE='en-GB', USE_24_HOUR_TIME_FORMAT=True)
def test_use_24_hour_time_format(self):
update_en_gb_date_formats()
@ -62,10 +62,10 @@ class GbFormatsTestCase(TestCase):
dt = datetime.datetime(year=2011, month=11, day=4, hour=2, minute=5,
second=59)
self.assertEqual(
date_format(dt, 'SHORT_DATETIME_FORMAT'), '04/11//2011 2:05:59')
date_format(dt, 'SHORT_DATETIME_FORMAT'), '04/11/2011 02:05')
t = datetime.time(hour=16, minute=2, second=25)
self.assertEqual(time_format(t), '16:02:25')
self.assertEqual(time_format(t), '16:02')
# def test_short_month_day_format(self):
# update_en_gb_date_formats()