diff --git a/aircox/tests/models/test_program.py b/aircox/tests/models/test_program.py index 412aebe..3350fa9 100644 --- a/aircox/tests/models/test_program.py +++ b/aircox/tests/models/test_program.py @@ -1,15 +1,27 @@ import pytest +import os + +from aircox.conf import settings from aircox.models import Station, Program class TestProgramQuerySet: @pytest.mark.django_db def test_station(self, stations, programs): - prog = Program.objects.station(station=stations[0]) - assert programs[0] in prog - assert programs[2] not in prog + programs_with_station_0 = Program.objects.station(station=stations[0]) + + assert programs[0] in programs_with_station_0 + assert programs[2] not in programs_with_station_0 + + @pytest.mark.django_db + def test_active(self, programs): + active_programs = Program.objects.active() + + assert active_programs[0].active == True class TestProgram: @pytest.mark.django_db - def test_station(self, stations): - pass \ No newline at end of file + def test_path(self, program): + program_path = program.path + + assert program_path == os.path.join(settings.PROGRAMS_DIR, program.slug.replace("-", "_")) \ No newline at end of file