forked from rc/aircox
Feat: packaging (#127)
- Add configuration files for packaging - Precommit now uses ruff Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: rc/aircox#127
This commit is contained in:
@ -53,13 +53,7 @@ def path_infos():
|
||||
|
||||
@pytest.fixture
|
||||
def sound_files(path_infos):
|
||||
return {
|
||||
k: r
|
||||
for k, r in (
|
||||
(path, SoundFile(conf.MEDIA_ROOT + "/" + path))
|
||||
for path in path_infos.keys()
|
||||
)
|
||||
}
|
||||
return {k: r for k, r in ((path, SoundFile(conf.MEDIA_ROOT + "/" + path)) for path in path_infos.keys())}
|
||||
|
||||
|
||||
def test_sound_path(sound_files):
|
||||
@ -78,17 +72,9 @@ def test_read_path(path_infos, sound_files):
|
||||
|
||||
def _setup_diff(program, info):
|
||||
episode = models.Episode(program=program, title="test-episode")
|
||||
at = tz.datetime(
|
||||
**{
|
||||
k: info[k]
|
||||
for k in ("year", "month", "day", "hour", "minute")
|
||||
if info.get(k)
|
||||
}
|
||||
)
|
||||
at = tz.datetime(**{k: info[k] for k in ("year", "month", "day", "hour", "minute") if info.get(k)})
|
||||
at = tz.make_aware(at)
|
||||
diff = models.Diffusion(
|
||||
episode=episode, start=at, end=at + timedelta(hours=1)
|
||||
)
|
||||
diff = models.Diffusion(episode=episode, start=at, end=at + timedelta(hours=1))
|
||||
episode.save()
|
||||
diff.save()
|
||||
return diff
|
||||
|
Reference in New Issue
Block a user