diff --git a/aircox/management/sound_file.py b/aircox/management/sound_file.py index b1cf31a..adba6db 100644 --- a/aircox/management/sound_file.py +++ b/aircox/management/sound_file.py @@ -175,7 +175,7 @@ class SoundFile: at = tz.datetime( year, month, day, pi.get("hour", 0), pi.get("minute", 0) ) - at = tz.get_current_timezone().localize(at) + at = tz.make_aware(at) else: at = date(year, month, day) diff --git a/aircox/tests/management/test_sound_file.py b/aircox/tests/management/test_sound_file.py index 32c75c4..0f855dd 100644 --- a/aircox/tests/management/test_sound_file.py +++ b/aircox/tests/management/test_sound_file.py @@ -94,6 +94,7 @@ def _setup_diff(program, info): return diff +@pytest.mark.django_db(transaction=True) def test_find_episode(sound_files): station = models.Station(name="test-station") program = models.Program(station=station, title="test")