oncall-engine/engine/apps/public_api/tests
Joey Orlando 9dde1805aa
add mypy static type checker to backend codebase (#2151)
# What this PR does

- Adds [`mypy` static type checking](https://mypy-lang.org/) to our CI
pipeline. Currently there is still a **ton** of errors being returned by
the tool, as we'll need to fix pre-existing errors. I think we can
slowly chip away at these errors in small PRs, doing them all in one
large PR is likely very risky.
- Also, this PR starts chipping away at one of the main type errors that
we have which is accessing the `datetime` class (from the `datetime`
library) or `timedelta` function on the `django.utils.timezone` module.
Basically we should be instead accessing these two objects from the
native `datetime` module. This makes sense because the [`__all__`
attribute](https://github.com/django/django/blob/main/django/utils/timezone.py#L14-L30)
in `django.utils.timezone` does not re-export `datetime` or `timedelta`.
- splits `engine` dependencies out into `requirements.txt` and
`requirements-dev.txt`

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-12 12:50:33 -04:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_alerts.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_custom_actions.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
test_escalation_chain.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_escalation_policies.py Check for duplicated positions in TF escalation policies (#1554) 2023-03-16 11:48:11 +00:00
test_incidents.py upgrade to python 3.11.3 (#1849) 2023-05-05 15:32:40 +00:00
test_integrations.py Add inbound email address in integration API (#2113) 2023-06-06 13:08:54 +00:00
test_maintenance.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_on_call_shifts.py Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
test_personal_notification_rules.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_ratelimit.py Add ratelimit for phone number verification (#1354) 2023-02-21 16:47:52 +08:00
test_resolution_notes.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
test_routes.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
test_schedule_export.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
test_schedules.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
test_slack_channels.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_teams.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_user_groups.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_users.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00