# What this PR does **Shift Swap Requests** https://www.loom.com/share/860c3337b338412cbd2ac4024260f3e8?sid=3d91b558-b4de-4351-8b45-8a99b7302346 **Other** - Drastically improve the typing in the `slack` Django app, and several other models/functions that were consumed by logic within the `slack` Django app (ex. setting `RelatedManager` type hints on various models) https://www.loom.com/share/da6b9984519c48d59a45d3c93c08d7dc ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required)
16 lines
601 B
Python
16 lines
601 B
Python
from unittest.mock import patch
|
|
|
|
import pytest
|
|
|
|
from apps.schedules.models import OnCallScheduleWeb
|
|
from apps.schedules.tasks.drop_cached_ical import drop_cached_ical_task
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_drop_cached_ical_triggers_final_refresh(make_organization, make_schedule):
|
|
organization = make_organization()
|
|
schedule = make_schedule(organization, schedule_class=OnCallScheduleWeb)
|
|
|
|
with patch("apps.schedules.tasks.drop_cached_ical.refresh_ical_final_schedule") as mock_refresh_final:
|
|
drop_cached_ical_task(schedule.pk)
|
|
assert mock_refresh_final.apply_async.called
|