# What this PR does Adds some logging for inbound email + comment on why I disabled `pytest-socket` in a [recent PR](https://github.com/grafana/oncall/pull/5328) ## 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] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes.
33 lines
1.6 KiB
INI
33 lines
1.6 KiB
INI
[flake8]
|
|
max-line-length = 180
|
|
extend-ignore = E203
|
|
extend-exclude = */migrations/*
|
|
ban-relative-imports = parents
|
|
banned-modules =
|
|
jinja2.Template = Use apply_jinja_template instead
|
|
django.apps.apps = Import models directly instead
|
|
|
|
[pytest]
|
|
# https://pytest-django.readthedocs.io/en/latest/configuring_django.html#order-of-choosing-settings
|
|
# https://pytest-django.readthedocs.io/en/latest/database.html
|
|
# https://pytest-xdist.readthedocs.io/en/stable/distribution.html#running-tests-across-multiple-cpus
|
|
#
|
|
# --dist no = temporarily disable xdist as it's leading to flaky tests :(
|
|
# https://github.com/grafana/oncall-private/issues/2733
|
|
|
|
# From pytest-socket docs (https://github.com/miketheman/pytest-socket):
|
|
# A plugin to use with Pytest to disable or restrict socket calls during tests to ensure network calls are prevented
|
|
# --disable-socket = tests should fail on any access to socket or libraries using socket with a SocketBlockedErro
|
|
# --allow-hosts = allow connections to the given hostnames/IPs.
|
|
# - localhost = our tests on CI use localhost as the host to connect to databases running locally in docker container
|
|
# - oncall-dev-mariadb = if you're running things locally, with a MariaDB instance running, there's a good chance the hostname will be this
|
|
# pytest-socket is disabled for now as it's making tests hang on CI
|
|
addopts = --dist no --no-migrations --color=yes --showlocals
|
|
# https://pytest-django.readthedocs.io/en/latest/faq.html#my-tests-are-not-being-found-why
|
|
python_files = tests.py test_*.py *_tests.py
|
|
|
|
filterwarnings =
|
|
ignore:::django_filters.*
|
|
ignore:::httpretty.*
|
|
ignore:::polymorphic.*
|
|
ignore:::telegram.*
|