remove coverage that is not reachable

This commit is contained in:
Matthias 2022-02-13 23:48:48 +01:00
parent 9246eea38e
commit 241101cee6
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 5 additions and 5 deletions

View File

@ -135,7 +135,7 @@ class IntegrationPluginBase(MixinBase, plugin_base.InvenTreePluginBase):
if not author:
author = self.package.get('author')
if not author:
author = _('No author found')
author = _('No author found') # pragma: no cover
return author
@property
@ -149,7 +149,7 @@ class IntegrationPluginBase(MixinBase, plugin_base.InvenTreePluginBase):
else:
pub_date = datetime.fromisoformat(str(pub_date))
if not pub_date:
pub_date = _('No date found')
pub_date = _('No date found') # pragma: no cover
return pub_date
@property
@ -241,11 +241,11 @@ class IntegrationPluginBase(MixinBase, plugin_base.InvenTreePluginBase):
# process sign state
sign_state = getattr(GitStatus, str(package.get('verified')), GitStatus.N)
if sign_state.status == 0:
self.sign_color = 'success'
self.sign_color = 'success' # pragma: no cover
elif sign_state.status == 1:
self.sign_color = 'warning'
else:
self.sign_color = 'danger'
self.sign_color = 'danger' # pragma: no cover
# set variables
self.package = package

View File

@ -52,7 +52,7 @@ def navigation_enabled(*args, **kwargs):
"""
if djangosettings.PLUGIN_TESTING:
return True
return InvenTreeSetting.get_setting('ENABLE_PLUGINS_NAVIGATION')
return InvenTreeSetting.get_setting('ENABLE_PLUGINS_NAVIGATION') # pragma: no cover
@register.simple_tag()