2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 04:25:42 +00:00

Fixes for unit tests

This commit is contained in:
Oliver
2022-01-04 21:36:27 +11:00
parent 928b90a833
commit ac849c1566
10 changed files with 116 additions and 69 deletions

View File

@ -18,9 +18,9 @@ class InvenTreePlugin():
# Override the plugin name for each concrete plugin instance
PLUGIN_NAME = ''
PLUGIN_SLUG = ''
PLUGIN_SLUG = None
PLUGIN_TITLE = ''
PLUGIN_TITLE = None
def plugin_name(self):
"""
@ -35,11 +35,14 @@ class InvenTreePlugin():
if slug is None:
slug = self.plugin_name()
return slugify(slug)
return slugify(slug.lower())
def plugin_title(self):
return self.PLUGIN_TITLE
if self.PLUGIN_TITLE:
return self.PLUGIN_TITLE
else:
return self.plugin_name()
def plugin_config(self, raise_error=False):
"""