forked from rc/aircox
tests: playlist_import, log_archiver, sound_stats.SoxStats
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user