Coverage for app/settings.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-23 11:16 -0600
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-23 11:16 -0600
1from os import environ
3SECRET_KEY = "test"
4INSTALLED_PACKAGES = [
5 "plain.auth",
6 "plain.sessions",
7 "plain.models",
8 "plain.oauth",
9 "app.users",
10]
11DATABASES = {
12 "default": {
13 "ENGINE": "plain.models.backends.sqlite3",
14 "NAME": ":memory:",
15 }
16}
17MIDDLEWARE = [
18 "plain.sessions.middleware.SessionMiddleware",
19 "plain.auth.middleware.AuthenticationMiddleware",
20]
21AUTH_LOGIN_URL = "login"
22AUTH_USER_MODEL = "users.User"
24# OAuth providers to use for a real, interactive test
25# (in a real config you'd probably do environ["key"] to raise a KeyError if an env var is forgotten)
26OAUTH_LOGIN_PROVIDERS = {
27 "github": {
28 "class": "providers.github.GitHubOAuthProvider",
29 "kwargs": {
30 "client_id": environ.get("GITHUB_CLIENT_ID"),
31 "client_secret": environ.get("GITHUB_CLIENT_SECRET"),
32 },
33 },
34 "bitbucket": {
35 "class": "providers.bitbucket.BitbucketOAuthProvider",
36 "kwargs": {
37 "client_id": environ.get("BITBUCKET_KEY"),
38 "client_secret": environ.get("BITBUCKET_SECRET"),
39 },
40 },
41 "gitlab": {
42 "class": "providers.gitlab.GitLabOAuthProvider",
43 "kwargs": {
44 "client_id": environ.get("GITLAB_APPLICATION_ID"),
45 "client_secret": environ.get("GITLAB_APPLICATION_SECRET"),
46 "scope": "read_user",
47 },
48 },
49}