beatonma / django-wm

Automatic Webmention functionality for Django models
https://beatonma.org/webmentions_tester/
GNU General Public License v3.0
13 stars 2 forks source link

Lots of "settings.WEBMENTIONS_URL_SCHEME should not be `http` when in production!" warnings during tests #48

Closed philgyford closed 1 year ago

philgyford commented 2 years ago

With 4.0.0, when I run my site's tests I get dozens of warnings from here:

    if not settings.DEBUG and scheme != "https":
        log.warning(
            f"settings.{SETTING_URL_SCHEME} should not be `http` when in production!"
        )

Because when running my tests, DEBUG is False and I'm not using https. It's not "in production". I can figure out how to stop my tests from showing warning-level log messages, but also part of me wonders if this is an appropriate message? Is it up to django-wm to police a site's use of http/https?

A minor quibble, so feel free to disagree and close this :)