@pytest.mark.django_db
def test_make_aware(settings):
 settings.USE_TZ = True
 datetime_object = datetime(2016, 1, 2, 21, 52, 25)
 assert timezone.is_naive(datetime_object)
 datetime_aware = make_aware(datetime_object)
 assert timezone.is_aware(datetime_aware)

@ pytest . mark . django_db def test_make_aware ( settings ) : settings . USE_TZ = True datetime_object = datetime ( 2016 , 1 , 2 , 21 , 52 , 25 ) assert timezone . is_naive ( datetime_object ) datetime_aware = make_aware ( datetime_object ) assert timezone . is_aware ( datetime_aware )
tests datetimes can be made aware of timezones .