@pytest.mark.django_db
def test_make_naive_use_tz_false(settings):
 settings.USE_TZ = False
 datetime_object = datetime(2016, 1, 2, 21, 52, 25, tzinfo=pytz.utc)
 assert timezone.is_aware(datetime_object)
 naive_datetime = make_naive(datetime_object)
 assert timezone.is_aware(naive_datetime)

@ pytest . mark . django_db def test_make_naive_use_tz_false ( settings ) : settings . USE_TZ = False datetime_object = datetime ( 2016 , 1 , 2 , 21 , 52 , 25 , tzinfo = pytz . utc ) assert timezone . is_aware ( datetime_object ) naive_datetime = make_naive ( datetime_object ) assert timezone . is_aware ( naive_datetime )
tests datetimes are left intact if use_tz is not in effect .