1 Star 0 Fork 0

draymondgewade/sentry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
conftest.py 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
from __future__ import absolute_import
import os
import sys
pytest_plugins = ["sentry.utils.pytest"]
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src"))
def pytest_configure(config):
import warnings
# XXX(dcramer): Kombu throws a warning due to transaction.commit_manually
# being used
warnings.filterwarnings("error", "", Warning, r"^(?!(|kombu|raven|sentry))")
# always install plugins for the tests
install_sentry_plugins()
config.addinivalue_line("markers", "obsolete: mark test as obsolete and soon to be removed")
def install_sentry_plugins():
# Sentry's pytest plugin explicitly doesn't load plugins, so let's load all of them
# and ignore the fact that we're not *just* testing our own
# Note: We could manually register/configure INSTALLED_APPS by traversing our entry points
# or package directories, but this is easier assuming Sentry doesn't change APIs.
# Note: Order of operations matters here.
from sentry.runner.importer import install_plugin_apps
from django.conf import settings
install_plugin_apps("sentry.apps", settings)
from sentry.runner.initializer import register_plugins
register_plugins(settings, raise_on_plugin_load_failure=True)
settings.ASANA_CLIENT_ID = "abc"
settings.ASANA_CLIENT_SECRET = "123"
settings.BITBUCKET_CONSUMER_KEY = "abc"
settings.BITBUCKET_CONSUMER_SECRET = "123"
settings.GITHUB_APP_ID = "abc"
settings.GITHUB_API_SECRET = "123"
# this isn't the real secret
settings.SENTRY_OPTIONS["github.integration-hook-secret"] = "b3002c3e321d4b7880360d397db2ccfd"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/draymondgewade/sentry.git
[email protected]:draymondgewade/sentry.git
draymondgewade
sentry
sentry
master

搜索帮助