Unit Test and named urls

This commit is contained in:
Silvio Leite
2018-08-13 22:34:56 -03:00
parent 447bf17e63
commit 376f6e487a
7 changed files with 158 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
from django.test import TestCase
from pwa import app_settings
class AppSettingsTest(TestCase):
def test_has_defined(self):
"""Must have the attributes defined in app_settings.py"""
attributes = [
'PWA_SERVICE_WORKER_PATH',
'PWA_APP_NAME',
'PWA_APP_DESCRIPTION',
'PWA_APP_ROOT_URL',
'PWA_APP_THEME_COLOR',
'PWA_APP_BACKGROUND_COLOR',
'PWA_APP_DISPLAY',
'PWA_APP_START_URL',
'PWA_APP_ICONS'
]
for attr in attributes:
with self.subTest():
self.assertTrue(hasattr(app_settings, attr))