diff --git a/posthog/settings/access.py b/posthog/settings/access.py index 1a339e6a54c398..0d76473d71e60e 100644 --- a/posthog/settings/access.py +++ b/posthog/settings/access.py @@ -63,11 +63,9 @@ if not DEBUG and not TEST and SECRET_KEY == DEFAULT_SECRET_KEY: logger.critical( """ - You are using the default SECRET_KEY in a production environment! - For the safety of your instance, you must generate and set a unique key., - More information on - https://posthog.com/docs/self-host/configure/securing-posthog, - """ +You are using the default SECRET_KEY in a production environment! +For the safety of your instance, you must generate and set a unique key. +""" ) sys.exit("[ERROR] Default SECRET_KEY in production. Stopping Django server…\n") diff --git a/posthog/settings/overrides.py b/posthog/settings/overrides.py index 5e5191a2a91580..1b4f8298ef74bc 100644 --- a/posthog/settings/overrides.py +++ b/posthog/settings/overrides.py @@ -32,7 +32,7 @@ if runner: cmd = sys.argv[1] if len(sys.argv) >= 2 else None - if cmd == "test" or runner.endswith("pytest") or runner.endswith("mypy"): + if cmd == "test" or runner.endswith("pytest") or runner.endswith("mypy") or "/mypy/" in runner: print("Running in test mode. Setting DEBUG and TEST environment variables.") os.environ["DEBUG"] = "1" os.environ["TEST"] = "1"