mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
test _str
This commit is contained in:
parent
1a70829f5c
commit
7f8d20da0f
@ -10,6 +10,7 @@ from django.urls import reverse
|
||||
|
||||
from InvenTree.api_tester import InvenTreeAPITestCase
|
||||
from InvenTree.helpers import str2bool
|
||||
from plugin.models import NotificationUserSetting
|
||||
|
||||
from .models import InvenTreeSetting, InvenTreeUserSetting, WebhookEndpoint, WebhookMessage, NotificationEntry
|
||||
from .api import WebhookView
|
||||
@ -386,6 +387,11 @@ class NotificationUserSettingsApiTest(InvenTreeAPITestCase):
|
||||
|
||||
self.get(url, expected_code=200)
|
||||
|
||||
def test_setting(self):
|
||||
"""Test the string name for NotificationUserSetting"""
|
||||
test_setting = NotificationUserSetting.get_setting_object('NOTIFICATION_METHOD_MAIL', user=self.user)
|
||||
self.assertEqual(str(test_setting), 'NOTIFICATION_METHOD_MAIL (for testuser): ')
|
||||
|
||||
|
||||
class WebhookMessageTests(TestCase):
|
||||
def setUp(self):
|
||||
|
Loading…
Reference in New Issue
Block a user