mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 13:28:49 +00:00
remove coverage that is not reachable
This commit is contained in:
parent
9246eea38e
commit
241101cee6
@ -135,7 +135,7 @@ class IntegrationPluginBase(MixinBase, plugin_base.InvenTreePluginBase):
|
|||||||
if not author:
|
if not author:
|
||||||
author = self.package.get('author')
|
author = self.package.get('author')
|
||||||
if not author:
|
if not author:
|
||||||
author = _('No author found')
|
author = _('No author found') # pragma: no cover
|
||||||
return author
|
return author
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -149,7 +149,7 @@ class IntegrationPluginBase(MixinBase, plugin_base.InvenTreePluginBase):
|
|||||||
else:
|
else:
|
||||||
pub_date = datetime.fromisoformat(str(pub_date))
|
pub_date = datetime.fromisoformat(str(pub_date))
|
||||||
if not pub_date:
|
if not pub_date:
|
||||||
pub_date = _('No date found')
|
pub_date = _('No date found') # pragma: no cover
|
||||||
return pub_date
|
return pub_date
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -241,11 +241,11 @@ class IntegrationPluginBase(MixinBase, plugin_base.InvenTreePluginBase):
|
|||||||
# process sign state
|
# process sign state
|
||||||
sign_state = getattr(GitStatus, str(package.get('verified')), GitStatus.N)
|
sign_state = getattr(GitStatus, str(package.get('verified')), GitStatus.N)
|
||||||
if sign_state.status == 0:
|
if sign_state.status == 0:
|
||||||
self.sign_color = 'success'
|
self.sign_color = 'success' # pragma: no cover
|
||||||
elif sign_state.status == 1:
|
elif sign_state.status == 1:
|
||||||
self.sign_color = 'warning'
|
self.sign_color = 'warning'
|
||||||
else:
|
else:
|
||||||
self.sign_color = 'danger'
|
self.sign_color = 'danger' # pragma: no cover
|
||||||
|
|
||||||
# set variables
|
# set variables
|
||||||
self.package = package
|
self.package = package
|
||||||
|
@ -52,7 +52,7 @@ def navigation_enabled(*args, **kwargs):
|
|||||||
"""
|
"""
|
||||||
if djangosettings.PLUGIN_TESTING:
|
if djangosettings.PLUGIN_TESTING:
|
||||||
return True
|
return True
|
||||||
return InvenTreeSetting.get_setting('ENABLE_PLUGINS_NAVIGATION')
|
return InvenTreeSetting.get_setting('ENABLE_PLUGINS_NAVIGATION') # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user