reduce tests numbers

This commit is contained in:
bkfox 2023-04-18 18:47:48 +02:00
parent cd19c26e82
commit a5cda0b203

View File

@ -56,8 +56,8 @@ class TestSchedule:
assert schedule.dates_of_month(at) == [] assert schedule.dates_of_month(at) == []
@pytest.mark.django_db @pytest.mark.django_db
@pytest.mark.parametrize("months", range(0, 25, 2)) @pytest.mark.parametrize("months", range(0, 25, 4))
@pytest.mark.parametrize("hour", range(0, 24, 3)) @pytest.mark.parametrize("hour", range(0, 24, 4))
def test_dates_of_month_last(self, months, hour): def test_dates_of_month_last(self, months, hour):
schedule = baker.prepare( schedule = baker.prepare(
Schedule, time=time(hour, 00), frequency=Schedule.Frequency.last Schedule, time=time(hour, 00), frequency=Schedule.Frequency.last
@ -81,8 +81,8 @@ class TestSchedule:
# since the same method is used for first, second, etc. frequencies # since the same method is used for first, second, etc. frequencies
# we assume testing every is sufficient # we assume testing every is sufficient
@pytest.mark.django_db @pytest.mark.django_db
@pytest.mark.parametrize("months", range(0, 25, 2)) @pytest.mark.parametrize("months", range(0, 25, 4))
@pytest.mark.parametrize("hour", range(0, 24, 3)) @pytest.mark.parametrize("hour", range(0, 24, 4))
def test_dates_of_month_every(self, months, hour): def test_dates_of_month_every(self, months, hour):
schedule = baker.prepare( schedule = baker.prepare(
Schedule, time=time(hour, 00), frequency=Schedule.Frequency.every Schedule, time=time(hour, 00), frequency=Schedule.Frequency.every
@ -97,8 +97,8 @@ class TestSchedule:
last = dt last = dt
@pytest.mark.django_db @pytest.mark.django_db
@pytest.mark.parametrize("months", range(0, 25, 2)) @pytest.mark.parametrize("months", range(0, 25, 4))
@pytest.mark.parametrize("hour", range(0, 24, 3)) @pytest.mark.parametrize("hour", range(0, 24, 4))
def test_dates_of_month_one_on_two(self, months, hour): def test_dates_of_month_one_on_two(self, months, hour):
schedule = baker.prepare( schedule = baker.prepare(
Schedule, Schedule,