oncall-engine/engine/apps/api/tests
Joey Orlando 2576954b51
add shifts property to shift swap request response schema + finalize slack message layout (#2712)
# What this PR does

- drop `GET /api/internal/v1/shift_swaps/<id>/shifts` endpoint in favour
of adding a `shifts` property to the response schema for all shift swap
endpoints (expect `GET /api/internal/v1/shift_swaps` (ie. list all))
- Update the Slack message layout:

<img width="590" alt="Screenshot 2023-08-01 at 17 28 44"
src="https://github.com/grafana/oncall/assets/9406895/84a51614-5dd6-48ec-ae81-fef4bc32fec9">

**Note**: about the highlighted lines. This is a small issue w/ the
`ShiftSwapRequest.shifts` method. @matiasb is already helping out here 🙏

**Other stuff**
- adds some type hints related to the code I was working around with
- slightly refactor `apps.slack.utils.format_datetime_to_slack` to make
it more generic for the use case in this PR

## 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)
2023-08-01 14:21:02 -04:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
conftest.py Refactor maintenance (#1340) 2023-02-23 07:13:03 +00:00
test_alert_group.py Minor formatting changes (#2641) 2023-07-26 14:45:44 +01:00
test_alert_receive_channel.py Improve APIs for creating/updating direct paging integrations (#2603) 2023-07-21 10:01:58 +00:00
test_alert_receive_channel_template.py Fix 500 on templates when slack or tg integration is disabled (#2064) 2023-05-31 08:22:58 +00:00
test_auth.py Reworked slack login pipeline errors (#2526) 2023-07-18 13:31:11 +00:00
test_channel_filter.py Minor formatting changes (#2641) 2023-07-26 14:45:44 +01:00
test_custom_button.py use CustomURLValidator in custom_button (#1398) 2023-03-23 12:21:17 +00:00
test_escalation_chain.py Allow changing team for escalation chains (#1658) 2023-03-30 10:43:00 +01:00
test_escalation_policy.py Fix duplicate orders on routes and escalation policies (#2568) 2023-07-18 17:17:53 +00:00
test_features.py Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
test_integration_heartbeat.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_live_settings.py Fix Telegram ratelimit on live setting change (#2100) 2023-06-06 15:18:12 +00:00
test_oncall_shift.py augment API response pagination attributes (#2471) 2023-07-14 11:19:40 -04:00
test_organization.py add rbac_permissions to current-user response + rbac_enabled to current-org response (#2611) 2023-07-21 11:38:58 -04:00
test_paging.py Direct paging: page if acked or silenced, show warning when resolved (#2639) 2023-07-26 13:25:26 +01:00
test_permissions.py shift swap requests model + CRUD endpoints (#2597) 2023-07-21 19:35:19 +00:00
test_postmortem_messages.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_preview_template_options.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_public_api_tokens.py only grant admins read/write access to public api keys (#952) 2022-12-06 13:02:53 +01:00
test_route_regex_debugger.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_schedule_export.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_schedules.py Add filter_shift_swaps endpoint to schedules API (#2684) 2023-07-31 11:41:37 +00:00
test_set_general_log_channel.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_shift_swaps.py add shifts property to shift swap request response schema + finalize slack message layout (#2712) 2023-08-01 14:21:02 -04:00
test_slack_channels.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_slack_team_settings.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_team.py Minor formatting changes (#2641) 2023-07-26 14:45:44 +01:00
test_telegram_channel.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_user.py add rbac_permissions to current-user response + rbac_enabled to current-org response (#2611) 2023-07-21 11:38:58 -04:00
test_user_groups.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_user_notification_policy.py Fix duplicate orders for user notification policies (#2278) 2023-06-21 11:13:56 +00:00
test_user_schedule_export.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_webhooks.py Check original webhook for sensitive fields when copying (#2608) 2023-07-20 21:23:33 +00:00