Implement test coverage for app
This commit is contained in:
@@ -19,13 +19,13 @@ class BackerTestCase(TestCase):
|
||||
backer = ConfigBackedUAList()
|
||||
from django.conf import settings
|
||||
|
||||
if not settings.configured:
|
||||
if not settings.configured: # pragma: no cover
|
||||
raise Exception("Django settings not configured")
|
||||
|
||||
if not hasattr(settings, "AI_BLOCKER_CONF"):
|
||||
if not hasattr(settings, "AI_BLOCKER_CONF"): # pragma: no cover
|
||||
raise Exception("AI_BLOCKER_CONF not configured")
|
||||
|
||||
if not "ua_list" in settings.AI_BLOCKER_CONF or not len(settings.AI_BLOCKER_CONF['ua_list']) > 0:
|
||||
if not "ua_list" in settings.AI_BLOCKER_CONF or not len(settings.AI_BLOCKER_CONF['ua_list']) > 0: # pragma: no cover
|
||||
raise Exception("AI_BLOCKER_CONF.ua_list not configured")
|
||||
|
||||
self.assertGreater(len(backer.get_ua_list()), 0)
|
||||
|
||||
Reference in New Issue
Block a user