tests: playlist_import, log_archiver, sound_stats.SoxStats

This commit is contained in:
bkfox
2023-06-22 23:29:51 +02:00
parent a289e1ef05
commit b2f4bce717
8 changed files with 282 additions and 82 deletions

View File

@ -115,3 +115,19 @@ def podcasts(episodes):
@pytest.fixture
def sound(program):
return baker.make(models.Sound, file="tmp/test.wav", program=program)
@pytest.fixture
def tracks(episode, sound):
items = [
baker.prepare(
models.Track, episode=episode, position=i, timestamp=i * 60
)
for i in range(0, 3)
]
items += [
baker.prepare(models.Track, sound=sound, position=i, timestamp=i * 60)
for i in range(0, 3)
]
models.Track.objects.bulk_create(items)
return items