2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

Merge remote-tracking branch 'inventree/master'

This commit is contained in:
Oliver Walters
2022-07-04 09:02:56 +10:00
5 changed files with 39 additions and 26 deletions

View File

@ -22,7 +22,7 @@ ENV PYTHONUNBUFFERED 1
# Ref: https://github.com/pyca/cryptography/issues/5776 # Ref: https://github.com/pyca/cryptography/issues/5776
ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1 ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1
ENV INVENTREE_LOG_LEVEL="INFO" ENV INVENTREE_LOG_LEVEL="WARNING"
ENV INVENTREE_DOCKER="true" ENV INVENTREE_DOCKER="true"
# InvenTree paths # InvenTree paths

View File

@ -875,7 +875,15 @@ REMOTE_LOGIN_HEADER = get_setting('INVENTREE_REMOTE_LOGIN_HEADER', CONFIG.get('r
# Markdownify configuration # Markdownify configuration
# Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html # Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html
MARKDOWNIFY_WHITELIST_TAGS = [ MARKDOWNIFY = {
'default': {
'BLEACH': True,
'WHITELIST_ATTRS': [
'href',
'src',
'alt',
],
'WHITELIST_TAGS': [
'a', 'a',
'abbr', 'abbr',
'b', 'b',
@ -889,15 +897,9 @@ MARKDOWNIFY_WHITELIST_TAGS = [
'p', 'p',
'strong', 'strong',
'ul' 'ul'
] ],
}
MARKDOWNIFY_WHITELIST_ATTRS = [ }
'href',
'src',
'alt',
]
MARKDOWNIFY_BLEACH = False
# Error reporting # Error reporting
SENTRY_ENABLED = get_setting('INVENTREE_SENTRY_ENABLED', CONFIG.get('sentry_enabled', False)) SENTRY_ENABLED = get_setting('INVENTREE_SENTRY_ENABLED', CONFIG.get('sentry_enabled', False))

View File

@ -1,5 +1,7 @@
"""Tests for core_notifications.""" """Tests for core_notifications."""
from django.core import mail
from part.test_part import BaseNotificationIntegrationTest from part.test_part import BaseNotificationIntegrationTest
from plugin import registry from plugin import registry
from plugin.builtin.integration.core_notifications import \ from plugin.builtin.integration.core_notifications import \
@ -12,6 +14,9 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest):
def test_email(self): def test_email(self):
"""Ensure that the email notifications run.""" """Ensure that the email notifications run."""
# No email should be send
self.assertEqual(len(mail.outbox), 0)
# enable plugin and set mail setting to true # enable plugin and set mail setting to true
plugin = registry.plugins.get('corenotificationsplugin') plugin = registry.plugins.get('corenotificationsplugin')
plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True) plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True)
@ -25,3 +30,6 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest):
# run through # run through
self._notification_run(CoreNotificationsPlugin.EmailNotification) self._notification_run(CoreNotificationsPlugin.EmailNotification)
# Now one mail should be send
self.assertEqual(len(mail.outbox), 1)

View File

@ -1,6 +1,7 @@
# Please keep this list sorted - if you pin a version provide a reason # Please keep this list sorted - if you pin a version provide a reason
Django<4 # Django package Django<4 # Django package
coreapi # API documentation for djangorestframework coreapi # API documentation for djangorestframework
cryptography==3.4.8 # Core cryptographic functionality
django-allauth # SSO for external providers via OpenID django-allauth # SSO for external providers via OpenID
django-allauth-2fa # MFA / 2FA django-allauth-2fa # MFA / 2FA
django-cleanup # Automated deletion of old / unused uploaded files django-cleanup # Automated deletion of old / unused uploaded files

View File

@ -30,8 +30,10 @@ coreapi==2.3.3
# via -r requirements.in # via -r requirements.in
coreschema==0.0.4 coreschema==0.0.4
# via coreapi # via coreapi
cryptography==37.0.2 cryptography==3.4.8
# via pyjwt # via
# -r requirements.in
# pyjwt
cssselect2==0.6.0 cssselect2==0.6.0
# via weasyprint # via weasyprint
defusedxml==0.7.1 defusedxml==0.7.1