mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Exclude testing exceptions from coverage (#3046)
* exclude testing excetions * check user str * check related users * move no coverage marker * fix assertation * add test for filters * do not cover logs
This commit is contained in:
@ -20,7 +20,7 @@ class PluginAppConfig(AppConfig):
|
||||
def ready(self):
|
||||
if settings.PLUGINS_ENABLED:
|
||||
if not canAppAccessDatabase(allow_test=True):
|
||||
logger.info("Skipping plugin loading sequence")
|
||||
logger.info("Skipping plugin loading sequence") # pragma: no cover
|
||||
else:
|
||||
logger.info('Loading InvenTree plugins')
|
||||
|
||||
@ -48,4 +48,4 @@ class PluginAppConfig(AppConfig):
|
||||
log_error(_('Your enviroment has an outdated git version. This prevents InvenTree from loading plugin details.'), 'load')
|
||||
|
||||
else:
|
||||
logger.info("Plugins not enabled - skipping loading sequence")
|
||||
logger.info("Plugins not enabled - skipping loading sequence") # pragma: no cover
|
||||
|
@ -57,10 +57,10 @@ class SettingsMixin:
|
||||
except (OperationalError, ProgrammingError): # pragma: no cover
|
||||
plugin = None
|
||||
|
||||
if not plugin:
|
||||
if not plugin: # pragma: no cover
|
||||
# Cannot find associated plugin model, return
|
||||
logger.error(f"Plugin configuration not found for plugin '{self.slug}'")
|
||||
return # pragma: no cover
|
||||
return
|
||||
|
||||
PluginSetting.set_setting(key, value, user, plugin=plugin)
|
||||
|
||||
|
Reference in New Issue
Block a user