forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
This commit is contained in:
@ -66,7 +66,7 @@ class FakeSocket:
|
||||
# -- models
|
||||
@pytest.fixture
|
||||
def station():
|
||||
station = models.Station(name="test", path=working_dir, default=True, active=True)
|
||||
station = models.Station(name="test", default=True, active=True)
|
||||
station.save()
|
||||
return station
|
||||
|
||||
@ -77,7 +77,6 @@ def stations(station):
|
||||
models.Station(
|
||||
name=f"test-{i}",
|
||||
slug=f"test-{i}",
|
||||
path=working_dir,
|
||||
default=(i == 0),
|
||||
active=True,
|
||||
)
|
||||
@ -146,24 +145,28 @@ def episode(program):
|
||||
def sound(program, episode):
|
||||
sound = models.Sound(
|
||||
program=program,
|
||||
episode=episode,
|
||||
name="sound",
|
||||
type=models.Sound.TYPE_ARCHIVE,
|
||||
position=0,
|
||||
broadcast=True,
|
||||
file="sound.mp3",
|
||||
)
|
||||
sound.save(check=False)
|
||||
sound.save(sync=False)
|
||||
return sound
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def episode_sound(episode, sound):
|
||||
obj = models.EpisodeSound(episode=episode, sound=sound, position=0, broadcast=sound.broadcast)
|
||||
obj.save()
|
||||
return obj
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sounds(program):
|
||||
items = [
|
||||
models.Sound(
|
||||
name=f"sound {i}",
|
||||
program=program,
|
||||
type=models.Sound.TYPE_ARCHIVE,
|
||||
position=i,
|
||||
broadcast=True,
|
||||
file=f"sound-{i}.mp3",
|
||||
)
|
||||
for i in range(0, 3)
|
||||
|
Reference in New Issue
Block a user